Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
19 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
25 | |
10 | |
10 | |
9 | |
6 |