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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Anonymous
Not applicable

Combine Measure Selected Value Format with Calculate

Hi All,

I have a matrix table with the list of KPI in the rows with different data format (Currency & Percentage).
How can I combine the DAX Measure if I already have these measure:
Act = CALCULATE(sum('KPI Performance'[Val]),filter('KPI Performance','KPI Performance'[Type]="Actual"))

I want to combine with IF(SELECTEDVALUE('KPI Performance'[Attribute])="%GROWTH", FORMAT(CALCULATE(SUM('KPI Performance'[Val])),"Percent"),FORMAT(CALCULATE(SUM('KPI Performance'[Val])),"Currency")

Thank you.

1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @Anonymous 

 

Can you add more details about your request? do you want to change Act format?if yes, try this:

 

Act =
Var _A = CALCULATE(sum('KPI Performance'[Val]),filter('KPI Performance','KPI Performance'[Type]="Actual"))
return
IF(SELECTEDVALUE('KPI Performance'[Attribute])="%GROWTH", FORMAT(_A,"Percent"),FORMAT(_A,"Currency"))

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

 

Appreciate your Kudos!!

 

View solution in original post

1 REPLY 1
VahidDM
Super User
Super User

Hi @Anonymous 

 

Can you add more details about your request? do you want to change Act format?if yes, try this:

 

Act =
Var _A = CALCULATE(sum('KPI Performance'[Val]),filter('KPI Performance','KPI Performance'[Type]="Actual"))
return
IF(SELECTEDVALUE('KPI Performance'[Attribute])="%GROWTH", FORMAT(_A,"Percent"),FORMAT(_A,"Currency"))

 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

 

Appreciate your Kudos!!

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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