Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
cosminc
Post Partisan
Post Partisan

DAX KPI dynamic format % or number

Hi

i use a measure like this

 

KPI =
VAR _value =
SELECTEDVALUE ( 'KPI'[KPI] )
VAR result =
[sum]
* IF ( _value = "Budget", 1, 0 )
+ [share]
* IF ( _value = "Share", 1, 0 )
RETURN
result
 
the measure is formated as number with 1 decimal, but when _value is "Share" i need to be seen as %
 
thanks,
Cosmin
1 ACCEPTED SOLUTION
ChrisMendoza
Resident Rockstar
Resident Rockstar

@cosminc -

Maybe https://www.sqlbi.com/articles/using-concatenatex-in-measures/ might help in your situation? If you posted sample data, I am sure you will receive more assistance as it isn't clear what the data looks like.






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



View solution in original post

3 REPLIES 3
ChrisMendoza
Resident Rockstar
Resident Rockstar

@cosminc -

Maybe https://www.sqlbi.com/articles/using-concatenatex-in-measures/ might help in your situation? If you posted sample data, I am sure you will receive more assistance as it isn't clear what the data looks like.






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Thanks Chriss,

the column measure is formatted as number

and there are 2 posibilities, but one of them i want to represent as %

so in the same time the measure i want to be number  or when i switch to the other result need to be %

concatenate uses only text data?

i'm trying to use this.

thanks,

Cosmin

Hi @cosminc ,

Have you solved your problem?

If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

If you still need help, please share some data sample and your desired output so that we could help further on it.

Best Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.