Forum Discussion
Problems with The Visualization of a Measure With Percentage Variables
Good! []
The consultation is in order to better organize the measures.
I have several measures to achieve a visualization and I want to group it into a single measurement.
That is, I have several measurements with the required visualization and I look for the same with a single calculation.
The next measure is repeated for the different clients, resulting in the graph below.
For both Orange and the rest (Blue, Violet, green, red) the measure is the same.
CALCULATE(PAYMENTS[TOTAL],ALL(PAYMENTS)))
I cannot group them into a single measure, and thus avoid replicating 6/7 times the same measure for each client.
I have tried but the closest thing to the required result is the following.
I can't see the monthly representation (%) of each customer in the total as in the first chart.
Clarification: I seek to replicate what a Column Chart does 100% applied with the ribbon chart.
Sorry for the late reply. I misunderstood it previously. Please try this new measure. The updated pbix file is attached.
Measure 2 = VAR monthTotal = CALCULATE(SUM(Payments[Amount]),ALL(Payments[Customer])) VAR customerTotal = SUM(Payments[Amount]) RETURN DIVIDE(customerTotal,monthTotal)Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
12 Replies
- v-jingzhangCommunity Support
Try this measure and put CUSTOMER column into Legend card.
%PAYMENT = DIVIDE ( CALCULATE ( PAYMENTS[TOTAL] ), CALCULATE ( PAYMENTS[TOTAL], ALLEXCEPT ( PAYMENTS, PAYMENTS[Month] ) ) )Let me know if you still have questions.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.- Syndicate_AdminAdministrator
Good!
Thanks for helping.
It did not give me the expected result to use allexcept in the measure.
I keep trying other variants.
Best regards.- v-jingzhangCommunity Support
Can you provide some sample data and the single measure you used to get the closest result in the second image? I guess when you group them into a single measure, it may calculate the % of the total across all months rather than every single month.
BR,
Jing
- Syndicate_AdminAdministrator
Good!
I took the time to do it as it is by creating a "Year-Month" column even.
I still don't see the expected result.I do not achieve that per month the % per Client represents the total of 100%.
Best regards.- v-jingzhangCommunity Support
Sorry for the late reply. I misunderstood it previously. Please try this new measure. The updated pbix file is attached.
Measure 2 = VAR monthTotal = CALCULATE(SUM(Payments[Amount]),ALL(Payments[Customer])) VAR customerTotal = SUM(Payments[Amount]) RETURN DIVIDE(customerTotal,monthTotal)Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
- v-jingzhangCommunity Support
Sorry I don't understand what you mean by "But I have related the following calendar table, filtering by calendar(date)". You relate the data table to calendar table, right? What is or should be filtered by date? Where is the filter? Can you provide some sample data or maybe a simple .pbix file to help elaborate it more?
BR,
Jing
- Syndicate_AdminAdministrator
I explain, in your pbix file. you put Month. In my Payments table, the date (dd/mm/yy) is the column related to that calendar table.
Calendar[date] 1:* Payments(Date).
Then, I use the calculation equal to or similar to the one you performed. I add it as a measure to a table of ribbons, with axis of Calendar Hierarchy of Year and Month and the legend of Customers.
Thank you for your time again.