Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi there,
I apologize if I misuse terms or am unaware of a feature availabe in DAX/Power BI as I suspect my issue may be additional data prep, but I'm completely stumped. I've linked the data file just in case and I need to show how the proportions of a given category change over time (by month) in a line chart that would show values like below:
Computer Mobile Tablet Other
July | 47.22% | 49.92% | 2.67% | 0.19% |
October | 48.81% | 48.66% | 2.36% | 0.17% |
The only way I was able to show this was to use '% of row total' in excel 😭.
Key points:
I've tried three formulas for the calculated measure and they all don't work:
This makes all data points 100%
Count total for Month = DIVIDE(SUM(Combined[Count]),CALCULATE(SUM(Combined[Count]),FILTER('Date','Date'[Date].[Date])))
This gets an MdxScript error, below
Count total for Month = CALCULATE(SUM(Combined[Count]),Combined[Device])/COUNTROWS(Combined)
Error Message:
MdxScript(Model) (6, 73) Calculation error in measure 'Combined'[Count total for Month]: Cannot convert value 'Computer' of type Text to type True/False.
Count total for Month = SUM(Combined[Count])/CALCULATE(SUM(Combined[Count]),ALLEXCEPT('Date','Date'[Date].[Date]))
Solved! Go to Solution.
Hi all,
@aj1973 was very close with the solution, but a friend and I worked it out to be the following:
Hi all,
@aj1973 was very close with the solution, but a friend and I worked it out to be the following:
Hi Amine,
Apologies, I'm not doing a good job explaining myself. My goal would for the chart to look like the below but have the %'s add up to 100% for each month.
Is this close?
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
Yes that's the level of aggregraiton I need - but is it impossible to get it into a line chart?
Or do I have to create a secondary table (like the one you did) in Transform Data to feed these values?
here is the file.
https://drive.google.com/drive/folders/1AZwUoX41Sqyt9AS_j5V_yGgw2udTsO8u?usp=sharing
The chart you sent was not clear to me. try it yourself
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
Thank you very much for your help. Your contribution has sparked the solution I ultimately went with.
A summary table needs to be created that (as you've shown) contains the device proportions out of each month and device. I thought PowerBI would have done that automatically, but I ended up creating the additional columns required in excel and re-uploading.
I'm sure there's a way to do it in Power BI but I'm not skilled enough. Thank you!
There is a way to do what in power bi?
Any way glad you made it
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
Hi Amine,
Your calculation is adding all months to 100% - the desired calculation is for each month to be 100% AND for the devices to be xx% of that 100% in each month. Then we can see how each device % changes across each month.
Is this good?
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
Like this?
Regards
Amine Jerbi
If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
147 | |
85 | |
66 | |
52 | |
46 |
User | Count |
---|---|
215 | |
90 | |
83 | |
66 | |
58 |