The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have the below data about Revenue:
I need to combine 2 measures in a bar chart...
-Number of clients in each group.
-Group in different bins based on revenue group ie (0-1000) (1000-2000) (2000-3000) etc...
For the first measure I easily did it with a measure for each group:
CALCULATE ( DISTINCTCOUNT('Fact'[Key_Client]), FILTER('Fact','Fact'[Group1]>0) )
CALCULATE ( DISTINCTCOUNT('Fact'[Key_Client]), FILTER('Fact','Fact'[Group2]>0) )
CALCULATE ( DISTINCTCOUNT('Fact'[Key_Client]), FILTER('Fact','Fact'[Group3]>0) )
Regarding the second measure, how can I create the bins and group by custom bins? ie (0-1000) (1000-2000) (2000-3000) and combine it with the other measure to display it all in a bar chart?
So far I have it as:
Solved! Go to Solution.
Hi @Anonymous ,
It is suggested to UnPivot group columns and then refer to this blog - Group Bin in Power Query - Microsoft Power BI Community - to calculate group distribution.
Number of clients in each group =
CALCULATE (
DISTINCTCOUNT ( 'Fact'[Client] ),
FILTER ( ALLEXCEPT ( 'Fact', 'Fact'[Group] ), 'Fact'[Value] > 0 )
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
It is suggested to UnPivot group columns and then refer to this blog - Group Bin in Power Query - Microsoft Power BI Community - to calculate group distribution.
Number of clients in each group =
CALCULATE (
DISTINCTCOUNT ( 'Fact'[Client] ),
FILTER ( ALLEXCEPT ( 'Fact', 'Fact'[Group] ), 'Fact'[Value] > 0 )
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.