Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I have a data which is posted below,
https://filetransfer.io/data-package/a4zPdp0L#link
colors logics should be
IF [Trend green]="Positive" AND [ValueVsTarget]>=0 THEN "Green"
ELSEIF [Trend green]="Positive" AND [ValueVsTarget]<0 THEN "Red"
ELSEIF [Trend green]="Negative" AND [ValueVsTarget]<=0 THEN "Green"
ELSEIF [Trend green]="Negative" AND [ValueVsTarget]>0 THEN "Red"
ELSEIF [Trend green]="White" THEN "White"
ELSEIF [Trend green]="Grey" THEN "Grey"
END
i tried card, kpi e.t.c visuals to get the below output but unfortunately not happened.
I want to achieve,
Please help me how to achieve this kind of Visual in PBI with the data provided
Thanks in advance.
Solved! Go to Solution.
Hi @mehupbi ,
Based on your description, power bi really can't generate such an effect from a visual object. But you can do it by using a custom color for the card visual object. Here is the brief procedure
Here is my test data:
Create a column
Color =
VAR _ValueVsTarget = [Sum of Value] - [Target]
RETURN
SWITCH(
TRUE(),
[Trend_green] = "Positive" && _ValueVsTarget >= 0 , "Green",
[Trend_green] = "Positive" && _ValueVsTarget < 0 , "Red",
[Trend_green] = "Negative" && _ValueVsTarget >= 10 , "Blue",
[Trend_green] = "Negative" && _ValueVsTarget > 0 , "Red",
[Trend_green] = "Negative" && _ValueVsTarget <= 0 , "Green",
[Trend_green] = "White" , "White",
[Trend_green] = "Grey" , "Grey"
)
Create measures to fill the card
Service Level =
CALCULATE(
SUM('Table'[Sum of Value])/SUM('Table'[Target]),
FILTER(
'Table',
'Table'[Metric] = "Service Level"
)
)
Cost =
CALCULATE(
SUM('Table'[Sum of Value]),
FILTER(
'Table',
'Table'[Metric] = "Cost"
)
)
Create a measure to get the corresponding color
Color_Cost =
CALCULATE(
MAX('Table'[Color]),
FILTER(
'Table',
'Table'[Metric] = "Cost"
)
)
Color_Service Level =
CALCULATE(
MAX('Table'[Color]),
FILTER(
'Table',
'Table'[Metric] = "Service Level"
)
)
Go to General->Effects->Background
Create as many cards as you need
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Let me try and will accept solution once i get my required result
Hi @mehupbi ,
Did this method help you? If there are any other questions related to this post, you can reply below.
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @mehupbi ,
Based on your description, power bi really can't generate such an effect from a visual object. But you can do it by using a custom color for the card visual object. Here is the brief procedure
Here is my test data:
Create a column
Color =
VAR _ValueVsTarget = [Sum of Value] - [Target]
RETURN
SWITCH(
TRUE(),
[Trend_green] = "Positive" && _ValueVsTarget >= 0 , "Green",
[Trend_green] = "Positive" && _ValueVsTarget < 0 , "Red",
[Trend_green] = "Negative" && _ValueVsTarget >= 10 , "Blue",
[Trend_green] = "Negative" && _ValueVsTarget > 0 , "Red",
[Trend_green] = "Negative" && _ValueVsTarget <= 0 , "Green",
[Trend_green] = "White" , "White",
[Trend_green] = "Grey" , "Grey"
)
Create measures to fill the card
Service Level =
CALCULATE(
SUM('Table'[Sum of Value])/SUM('Table'[Target]),
FILTER(
'Table',
'Table'[Metric] = "Service Level"
)
)
Cost =
CALCULATE(
SUM('Table'[Sum of Value]),
FILTER(
'Table',
'Table'[Metric] = "Cost"
)
)
Create a measure to get the corresponding color
Color_Cost =
CALCULATE(
MAX('Table'[Color]),
FILTER(
'Table',
'Table'[Metric] = "Cost"
)
)
Color_Service Level =
CALCULATE(
MAX('Table'[Color]),
FILTER(
'Table',
'Table'[Metric] = "Service Level"
)
)
Go to General->Effects->Background
Create as many cards as you need
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
93 | |
86 | |
80 | |
69 | |
68 |
User | Count |
---|---|
226 | |
129 | |
119 | |
83 | |
77 |