The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello everyone,
I'm trying to do something simple. I got different values of the same kind referring to the same entities, and I want to group them in an histogram together.
I made an excel file to visualize what I had in mind:
Only in my case, sales A and sales B are two different tables and the value is not a column but rather a measurement I made with DAX. Is that possible?
Solved! Go to Solution.
Hi @errepinna ,
Is below what you need?
Check the updated .pbix file attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
@errepinna , Put both Location and type on Axis. Expand all levels. Sort on these two. And Switch off concatenate labels.
My issue is that I have no "Type" column. Each type has a dedicated table so I can't put it on axis.
@errepinna ,Create a common location table. Have measure From both Tables and use them in clustered visual
https://www.youtube.com/watch?v=Bkf35Roman8
I've already made a common table for the "location". Yet if I try to put both measures on values, it just piles them up in a single bar.
Hi @errepinna ,
Can you provide a sample .pbix file for test?
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Hi @errepinna ,
Modify your measures as below:
%impactAoverTotA =
//SUM('A type sale'[A value])/CALCULATE(SUM('A type sale'[A value]), REMOVEFILTERS('type'[Type]))
var _sumA=CALCULATE(SUM('A type sale'[A value]),FILTER(ALL('A type sale'),'A type sale'[Location Code]=MAX('location'[Location Code])&&'A type sale'[Type]=MAX('type'[Type])))
var _sumtotal=SUMX(ALL('A type sale'),'A type sale'[A value])
Return
DIVIDE(_sumA,_sumtotal)
%impactBoverTotB =
//SUM('B type sale'[B Value])/CALCULATE(SUM('B type sale'[B Value]), REMOVEFILTERS('type'[Type]))
var _sumB=CALCULATE(SUM('B type sale'[B Value]),FILTER(ALL('B type sale'),'B type sale'[Location Code]=MAX('location'[Location Code])&&'B type sale'[Type]=MAX('type'[Type])))
var _sumtotal=SUMX(ALL('B type sale'),'B type sale'[B Value])
Return
DIVIDE(_sumB,_sumtotal)
Then turn off "Concatenate labels" under X axis:
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Hello, thank you for your help!
However, this isn't what I'm trying to achieve. I'm already using an all-page filter to select a single "sale type" (RIC, DID, etc).
On top of that, I'm trying to display the two columns not piled up but separated, so that I can visualize their different height.
So the information is, for example: I want to see, for each location, how much (in %) of total sale A was realized on type DID compared to all Sale A. So I put a filter on the view for type DID and calculate the the %impactonA by removing the DID filter from the denumerator.
I do the same with sale B.
I want to see them close together instead of piled up. I don't care about having the different types on the axis because each type gets his view.
I'm sorry if I wasn't clear about it before.
Hi @errepinna ,
Is below what you need?
Check the updated .pbix file attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Worked out! Thanks!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
100 | |
94 | |
80 | |
63 | |
56 |
User | Count |
---|---|
248 | |
122 | |
110 | |
77 | |
70 |