Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I have a column containing items like A,B,C,D.
I would like to create a calculated column evaluating the following question: If the row of this column is equal to "A" then return 100%, If the row of this column is equal to "B" then return 85% ,
the row of this column is equal to "C" then return 65%, the row of this column is equal to "D" then return 50%. is it possible to do that ?
Solved! Go to Solution.
Column =
SWITCH(
'Table'[Item Column],
"A", 1,
"B", 0.85,
"C", 0.65,
"D", 0.5
)
And then, format this column as percentage
THANKS So much !
Now is there any way for me to assign these values to specific texts, if I have a character set and want to filter a part of the text of the line does it also work?
@FrankWoody my pleasure.
Sure you can, check out this function:
https://dax.guide/containsstring/
You can also explore there related functions.
Don't forget to mark my previous respond as a solution for comunity visabilty.
P.S. check out my showcase report:
https://community.powerbi.com/t5/Data-Stories-Gallery/SpartaBI-Feat-Contoso-100K/td-p/2449543
Give it a thumbs up over there if you liked it 🙂
Column =
SWITCH(
'Table'[Item Column],
"A", 1,
"B", 0.85,
"C", 0.65,
"D", 0.5
)
And then, format this column as percentage
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 12 | |
| 12 | |
| 10 | |
| 7 | |
| 6 |