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.
Hi, can someone please help with the following case?
I would like to use measures on axes, or maybe there is another way. See attached image.
Solved! Go to Solution.
Hi, @TWijnen
You can try the following methods.
Column:
Sum input = CALCULATE(SUM('Table'[input]),ALLEXCEPT('Table','Table'[day]))
Sum onput = CALCULATE(SUM('Table'[output]),ALLEXCEPT('Table','Table'[day]))
Category = SWITCH(TRUE(),
[Sum input]>[Sum onput],"more input",
[Sum input]<[Sum onput],"more onput",
[Sum input]=[Sum onput],"equal")
Count days = CALCULATE(DISTINCTCOUNT('Table'[day]),ALLEXCEPT('Table','Table'[Category]))
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-zhangti
Thanks for your reply. I still need to try it out on my dataset, the example I gave is very simplified compared to my real world scenario.
I see you used calculated columns, that is really helpful to me, for some reason I was thinking I could only solve this using measures.
I will reply later with my findings.
I dont understand why this post/question was marked as solved when I have not replied yet.
Hi, @TWijnen
You can try the following methods.
Column:
Sum input = CALCULATE(SUM('Table'[input]),ALLEXCEPT('Table','Table'[day]))
Sum onput = CALCULATE(SUM('Table'[output]),ALLEXCEPT('Table','Table'[day]))
Category = SWITCH(TRUE(),
[Sum input]>[Sum onput],"more input",
[Sum input]<[Sum onput],"more onput",
[Sum input]=[Sum onput],"equal")
Count days = CALCULATE(DISTINCTCOUNT('Table'[day]),ALLEXCEPT('Table','Table'[Category]))
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You mean for the logic in the "category measure"? I don't think that will work because at raw data row level there will be different outcomes of the "category measure" vs the outcomes on agreggated level. Check the data.
Agree? Or did you mean something else?
you need add a calculated column in your source data
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 |
---|---|
48 | |
24 | |
20 | |
14 | |
12 |
User | Count |
---|---|
57 | |
49 | |
43 | |
19 | |
18 |