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, Guys.
I have 4 measures (ROI, EBITDA, KPI 1, KPI 2) and I would like to classify in groups:
FINANCE: ROI, EBITDA
SALES: KPI 1, KPI 2
And I woud like to get this matrix:
I appreciate any solutions.
Thanks in advance.
Solved! Go to Solution.
You can format each in the new measure. Please check the file again.
Proud to be a Super User!
Hi @Andres_Maldo ,
I created some data:
Here are the steps you can follow:
1. Create caluculated table.
Table 2 =
CROSSJOIN(
VALUES('Table'[SUPERMARKET]),{"FINANCE","SALES"})
2. Create measure.
ROI_MEASURE = CALCULATE(SUM('Table'[Amount1]),FILTER(ALL('Table'),'Table'[SUPERMARKET]=MAX('Table'[SUPERMARKET])))
EBITDA_MEASURE = CALCULATE(SUM('Table'[Amount2]),FILTER(ALL('Table'),'Table'[SUPERMARKET]=MAX('Table'[SUPERMARKET])))
KPI1_MEASURE = CALCULATE(SUM('Table'[Amount3]),FILTER(ALL('Table'),'Table'[SUPERMARKET]=MAX('Table'[SUPERMARKET])))
KPI2_MEASURE = CALCULATE(SUM('Table'[Amount4]),FILTER(ALL('Table'),'Table'[SUPERMARKET]=MAX('Table'[SUPERMARKET])))
Measure =
SWITCH(
TRUE(),
MAX('Table 2'[Value])="FINANCE",CALCULATE([ROI_MEASURE],FILTER('Table','Table'[SUPERMARKET]=MAX('Table 2'[SUPERMARKET]))),
MAX('Table 2'[Value])="SALES",CALCULATE([EBITDA_MEASURE],FILTER('Table','Table'[SUPERMARKET]=MAX('Table 2'[SUPERMARKET]))) )
Measure 2 =
SWITCH(
TRUE(),
MAX('Table 2'[Value])="FINANCE",CALCULATE([KPI1_MEASURE],FILTER('Table','Table'[SUPERMARKET]=MAX('Table 2'[SUPERMARKET]))),
MAX('Table 2'[Value])="SALES",CALCULATE([KPI2_MEASURE],FILTER('Table','Table'[SUPERMARKET]=MAX('Table 2'[SUPERMARKET]))) )
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi, @Andres_Maldo
You can try this approach if fits to your data structure.
Proud to be a Super User!
Hi, ALLUREAN.
Thanks, but I have measures instead of columns. And I need to be measures. I am wondering is there is a way to group these measure in a matrix.
I use your 4 measures into one, not columns
Proud to be a Super User!
Thanks, I see. That´s an interesting approach, but what if I want KPI1 as a decimal number, KPI2 as a whole number and ROI as a percentaje? And I want to use conditional formatting in just one measure?
You can format each in the new measure. Please check the file again.
Proud to be a Super User!
Hi, @ALLUREAN.
I used a similar dax for colors, and it worked for conditional formatting.
Thanks, and I would like to use different conditional formating for each measure, for example, KP1 is going to be red if it is greater than 30 and green if it is lower than 30. But ROI is going to be green if it is greater than 10% and red if is lower than 10%.
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 |
---|---|
96 | |
93 | |
83 | |
70 | |
65 |
User | Count |
---|---|
118 | |
106 | |
93 | |
79 | |
72 |