Forum Discussion
Retain the same order when Import Excel Data to PBI Desktop and formatting
- Anonymous2 years ago
Hi PS_78 ,
Please follow these steps:
1.Use the following DAX expression to create a table
Table = SUMMARIZE('Tabelle1',Tabelle1[Metric Name],"Target",CALCULATE(SUM(Tabelle1[Value]),'Tabelle1'[Period Name] = "Target"))2.Creating table-to-table relationships
3.Use the following DAX expression to create a measure
Measure 2 = VAR _a = SUM('Table'[Target]) VAR _b = IF(SELECTEDVALUE(Tabelle1[Value]) > _a,"Yellow", IF(SELECTEDVALUE(Tabelle1[Value]) < _a,"Orange")) RETURN _b4.Final output
Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous - Thanks a lot. I can use this approach. I see that you restricted the target value in "Column" to only "Wtd". But I would have multiple measures (In the PBIX file I just took couple for example - for that instance I have to color code CY% cells too based on CY%'s target and actuals) and I have to color code each of them based on their targets and the actual values. I can still follow the suggested approach but I will have to create numerous columns for storing individual metrics "Target" and numerous measures for "Color Code".
I will wait for your response on this and "Accept your suggestion" as solution.
Thanks,
Phani
Hi PS_78 ,
Please follow these steps:
1.Use the following DAX expression to create a table
Table = SUMMARIZE('Tabelle1',Tabelle1[Metric Name],"Target",CALCULATE(SUM(Tabelle1[Value]),'Tabelle1'[Period Name] = "Target"))
2.Creating table-to-table relationships
3.Use the following DAX expression to create a measure
Measure 2 =
VAR _a = SUM('Table'[Target])
VAR _b = IF(SELECTEDVALUE(Tabelle1[Value]) > _a,"Yellow",
IF(SELECTEDVALUE(Tabelle1[Value]) < _a,"Orange"))
RETURN _b
4.Final output
Best Regards,
Wenbin Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.