Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi everyone,
I had a request to have totals of x months on the left side of a matrix table. like in the example below.
After researching, I found a method that worked with this article. https://4pbi.com/power-bi-matrix-totals-on-the-left/ Which requires creating a calculated table with distinct values of the lifetime in months.
Totalstable = UNION(
DISTINCT(Sales[lifetimeInMonths]),
DATATABLE("lifetimeInMonths", STRING, {{"2 months"}}
))
and then I have to create the following measures.
2_months= IF(SELECTEDVALUE('Totalstable '[lifetimeInMonths]) = " 2 months", 1, 0)
SalesWithTotal = IF([2_months], CALCULATE(SUM(Sales[Sales]), 'Totalstable '[lifetimeInMonths] in {1,2}, SUM(Sales[Sales]))
This works, However, since the calculated column lifetimeInMonths is now a text field, I now have a issue with sorting it the right way.
I created a lookup table like this to help with the sort. But for whatever reason, my measure SalesWithTotal then doesn't show my improvised 2_months result anymore
I have officially ran out of ideas. I tried some other things, and I got circular dependency errors.
I'm truly looking forward to your help.
Best regards.
Solved! Go to Solution.
See if this helps:
Creating a Hybrid or custom matrix
Proud to be a Super User!
Paul on Linkedin.
See if this helps:
Creating a Hybrid or custom matrix
Proud to be a Super User!
Paul on Linkedin.
ypu can create a second column and sort the table using that column as reference, them when used on the visual you will have that exact order on the table put it directly on the table column and get a blank square on top of the visual group it and there you go 😛
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |