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.
Dear community very good afternoon, I have the following problem:
I have a numeric type column called Value Month, what I need is for the prensentaod value in the table to have its corresponding format. That is, for example for the first row, "Cost Reduction" I need it to be displayed in Euro Currency format, for the next row I need it to be displayed with a normal number and for the third I need it to be displayed in percentage format.
I tried to do it using conditional columns, but the display in the table makes me dirty because of the number of additional columns I need to add.
Is there a functional way that allows me to give a specific format to each value depending on the unit I need?
I also have a column called unity that I can use as a conditioner.
I remain attentive to some extra data that can serve me.
Best regards.
Solved! Go to Solution.
Hi
Try like below.
Result =
VAR _Type =
SELECTEDVALUE ( 'Table'[Type] )
VAR _value =
SUM ( 'Table'[Value] )
RETURN
SWITCH (
TRUE (),
CONTAINSSTRING ( _Type, "$" ), FORMAT ( _value, "$ #,00" ),
CONTAINSSTRING ( _Type, "Days" ), FORMAT ( _value, "#,00" ),
CONTAINSSTRING ( _Type, "%" ), FORMAT ( _value, "#.00 %" )
)
Thanks
Hari
Hi
Try like below.
Result =
VAR _Type =
SELECTEDVALUE ( 'Table'[Type] )
VAR _value =
SUM ( 'Table'[Value] )
RETURN
SWITCH (
TRUE (),
CONTAINSSTRING ( _Type, "$" ), FORMAT ( _value, "$ #,00" ),
CONTAINSSTRING ( _Type, "Days" ), FORMAT ( _value, "#,00" ),
CONTAINSSTRING ( _Type, "%" ), FORMAT ( _value, "#.00 %" )
)
Thanks
Hari
tried switch function in my report page did not get the result . used new column write the following
SWITCH(
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 |
---|---|
108 | |
98 | |
78 | |
66 | |
53 |
User | Count |
---|---|
139 | |
100 | |
95 | |
85 | |
63 |