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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
beeEc009
Regular Visitor

DAX- Return a value based on two columns

 Hi all, 

 

I'm new to DAX and am trying to create a measure for a large report.

 

I have multiple (About 1000) states names & Ids with data names (about 10), Ids and values. I have created a small dataset in a similar format for this purpose.

 

Screenshot 2023-02-13 131033.png

 

I'm trying to create a dax measure that returns a value as percentage when data name is Amm Rate regardless of the state name, returns a value as currency when data name is Am Revenue or returns a value as number when data name is Ami Result.

1 REPLY 1
amitchandak
Super User
Super User

@beeEc009 , a new meausre

 

divide(Sum(Table[Value]), calculate(Sum(Table[Value]), Table[Data Name] ="Amm Rate") )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.