Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Dear all,
I have an issue with the formatting of the units. I currently have a matrix with two levels of headers and one column as a value :
I obtained it by unpivoting in Power query my data then use a matrix visual.
I'm pretty happy about the outcome of the visual as it is doing what i want, however as you can see some columns are meant to be in percentage not value, but as far as i know i can only choose one type per value, so that's mean it's either a whole number or percentage...
Is there any way to do custom type formatting according to the attribute of the value ?
i.e : have whole number for some columns and percentage for others ?
Let me know if you need additional information.
Thanks in advance for your help.
Best regards.
Astronomique.
Solved! Go to Solution.
I found a work around :
By using a switch and a calculated column :
Value Formatted = SWITCH (
TRUE (),
[Attribute] = "% Received" , FORMAT('Follow-up'[Value]*100, "0")&" %",
[Attribute] = "% projected", FORMAT('Follow-up'[Value]*100, "0")&" %",
FORMAT(INT([Value]),"#")
)
Now i need to sort out how to manage conditionnal formatting on colors ... Wish me good luck
I found a work around :
By using a switch and a calculated column :
Value Formatted = SWITCH (
TRUE (),
[Attribute] = "% Received" , FORMAT('Follow-up'[Value]*100, "0")&" %",
[Attribute] = "% projected", FORMAT('Follow-up'[Value]*100, "0")&" %",
FORMAT(INT([Value]),"#")
)
Now i need to sort out how to manage conditionnal formatting on colors ... Wish me good luck
@Astronomique you can create seperate measure that you want to show in the column and then define format for each measure as per your requirements.
Proud to be a Super User!
Yes that was a work around but in my case i wanted to keep the hierachy of the headers.
So far by unpivoting two times: i have two values : 1 for whole numbers and one for percentage.
But the headers are not looking good i have :
TOP HEADER
Header A | Header B
value A value B value A value B
When i would like to have
TOP HEADER
Header A | Header B
Value A Value B
is there anyway to work around with a measure and a switch() ?
I tried to use a calculated column to do that but apparently it gives back " you cannot yield data format in a calculated column
If you have any other ideas, let me know. I am still searching for a solution on my own.
@Astronomique , refer to this blog, this can help
https://radacad.com/dynamically-change-the-format-of-values-in-power-bi
Hi thanks for your link.
i had that idea of switch but so far does not work for a calculated column. trying to use it in a measure.
Will keep you updated.
User | Count |
---|---|
93 | |
83 | |
77 | |
71 | |
65 |
User | Count |
---|---|
114 | |
101 | |
96 | |
65 | |
60 |