Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
118 | |
81 | |
48 | |
37 | |
27 |
User | Count |
---|---|
185 | |
73 | |
73 | |
50 | |
42 |