Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
TWijnen
Frequent Visitor

DAX measures on axes question

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.

TWijnen_0-1674750074149.png

 

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

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]))

vzhangti_0-1675063280853.png

vzhangti_1-1675063301768.png

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.

View solution in original post

4 REPLIES 4
TWijnen
Frequent Visitor

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.

 

v-zhangti
Community Support
Community Support

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]))

vzhangti_0-1675063280853.png

vzhangti_1-1675063301768.png

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.

TWijnen
Frequent Visitor

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?

wdx223_Daniel
Super User
Super User

you need add a calculated column in your source data

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors