
1. Re: Calculations
Shinichiro Murakami May 11, 2018 3:00 PM (in response to NAYANA MADHEKAR)Hi Nayana,
Hope these helps.
It might be over complicated with the consideration of matching "100%" after ratio multiplication.
If you don't care decimal points, "Shop10" special handling is not needed.
Thanks,
Shin

Separate Sales_SM_10.5.twbx 27.5 KB


2. Re: Calculations
NAYANA MADHEKAR May 14, 2018 1:26 PM (in response to Shinichiro Murakami)Thank you very much. I highly appreciate your time & help.

3. Re: Calculations
Shinichiro Murakami May 14, 2018 2:52 PM (in response to NAYANA MADHEKAR)HI Nayana
You are welcome.
Thanks,
Shin

4. Re: Calculations
NAYANA MADHEKAR May 14, 2018 5:08 PM (in response to Shinichiro Murakami)Hello Shinichiro,
the data you helped me was a dummy data.. In my original dataset .. When calculating the sum :
This works : If [Online/Real]="Real" THEN SUM([Hours Worked]) ELSE 0 END
But if i try putting a FIXED in this calculation like below:
{ FIXED :(IF [Online/Real]="Real" THEN SUM([Hours Worked]) ELSE 0 END)}
It gives me an error.
Error: All fields in a level of detailed expression must come from the same datasource.
Could you help?
Thanks a ton!

5. Re: Calculations
Shinichiro Murakami May 14, 2018 5:16 PM (in response to NAYANA MADHEKAR)Without seeing data, but from the logic, try below, but again, difficult to say without data.
{ FIXED : sum (IF [Online/Real]="Real" THEN [Hours Worked] ELSE 0 END)}
Thanks,
Shin

6. Re: Calculations
NAYANA MADHEKAR May 14, 2018 5:26 PM (in response to Shinichiro Murakami)I get an error:
Cannot mix aggregate & non aggregate comparisons or results in 'IF' expressions.

7. Re: Calculations
Shinichiro Murakami May 14, 2018 5:31 PM (in response to NAYANA MADHEKAR)Please attach sample data as twbx with having error.
Thanks
Shin

8. Re: Calculations
NAYANA MADHEKAR May 14, 2018 6:06 PM (in response to Shinichiro Murakami)Hi Shinichiro,
Thank you for these quick responses..
As per our discussion above..
I have created a sample data with the same error.
Need to fix the calculation for FIXED CALCULATION.
Thank you.

Separate Sales2.twbx 104.2 KB


9. Re: Calculations
NAYANA MADHEKAR May 14, 2018 6:06 PM (in response to NAYANA MADHEKAR)Here it is..

Separate Sales2.twbx 104.2 KB


10. Re: Calculations
NAYANA MADHEKAR May 14, 2018 6:17 PM (in response to Shinichiro Murakami)Hi Shinichiro,
Unfortunately I cannot use JOIN.. The original dataset I have is huge & has been blended.. cannot make those changes.
But here are the excel sheets.. I agree JOIN would help.. but cannot use it for now.

Separate Sales2.twbx 104.2 KB

Sales.xlsx 8.3 KB

sales2.xlsx 8.3 KB


11. Re: Calculations
Shinichiro Murakami May 14, 2018 6:26 PM (in response to NAYANA MADHEKAR)You need to use join instead of blend,
Please correct "Shop 11" with "Shop11" or viseversa. (space in between or not)
Or
Rest of them are same.
Thanks,
Shin

Separate Sales2_SM_10.5.twbx 31.1 KB


12. Re: Calculations
NAYANA MADHEKAR May 15, 2018 12:39 PM (in response to Shinichiro Murakami)I cannot use JOIN. This is just a dummy data. My orginal data is all blended & cannot be changed.
Please let me know if you could still help over the FIXED Calculation.
All your help is highly appreciated.
Thank you.

13. Re: Calculations
Shinichiro Murakami May 15, 2018 12:53 PM (in response to NAYANA MADHEKAR)Unfortunately, Fixed does not work on blend.
Shin

14. Re: Calculations
NAYANA MADHEKAR May 17, 2018 1:52 PM (in response to Shinichiro Murakami)Np, Thanks Shinichiro!