Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello everyone,
I'm new user of Power BI and Dax. I'm writting to you because of a problem I can't achieve to solve.
I have a table with all my data and particularly those variables : Cycle, Country, average amount, mix effect.
I would like to put a filter in order the user can select two cycles. I created a numerical equivalent of cycle in order to get the filtered value dynamically.
Once those two cycles are selected, for each country, I would like to calculate the difference of the country amount with the total amount (Find below the values for the difference) :
Then, For each country, I would like to calculate the difference between amount of cycle 1 and amount of cycle 2 :
I tried this in order to achieve the first statement :
Unitary_Mix:= VAR MaxCycle = CALCULATE (VALUES(RESULT[Cycle]);FILTER(ALL(RESULT[Cycle_num]); RESULT[Cycle_num] = MAX(RESULT[Cycle_num]))) VAR MinCycle = CALCULATE (VALUES(RESULT[Cycle]);FILTER(ALL(RESULT[Cycle_num]); RESULT[Cycle_num] = MIN(RESULT[Cycle_num]))) Return CALCULATE(RESULT[av_EI_nedc_sales_filtered]; FILTER(RESULT;[Cycle] = MinCycle)) - CALCULATE(SUM(RESULT[av_EI_nedc_sales_filtered]); RESULT[Cycle] = MaxCycle)
But it doesn't work. Can someone help me about this please ?
Thank you in advance for your answers.
Regards
Solved! Go to Solution.
I'm not sure exactly what you're asking for here. Your [Unitary_Mix] measure looks like it should work. What incorrect results are you seeing, and what are the expected results?
In the first example, would you want to display 2.7 in the row instead of 102.2? Or would you want to display both 102.2 and 2.7 values next to each other in the matrix?
For the second example, do you want the total column to be the difference between the other two? Or do you want the second column to be the difference from the first column? Do you want this as another sub-column?
I'm assuming each entry is an aggregated average, but I can't tell much more than that. Is it possible for you to share your data with us? Even a smaller subset of anonymized data with desired output values would be very helpful here. The ability to copy paste your data makes it much easier to develop prototypes.
I'm not sure exactly what you're asking for here. Your [Unitary_Mix] measure looks like it should work. What incorrect results are you seeing, and what are the expected results?
In the first example, would you want to display 2.7 in the row instead of 102.2? Or would you want to display both 102.2 and 2.7 values next to each other in the matrix?
For the second example, do you want the total column to be the difference between the other two? Or do you want the second column to be the difference from the first column? Do you want this as another sub-column?
I'm assuming each entry is an aggregated average, but I can't tell much more than that. Is it possible for you to share your data with us? Even a smaller subset of anonymized data with desired output values would be very helpful here. The ability to copy paste your data makes it much easier to develop prototypes.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
18 |