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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
rbalza
Helper III
Helper III

Different DAX measures/formula on each row

Hi Power Users,

 

Is there a way in DAX to have a calculation/formula on each rows? I have a few categories and I wanted to calculate each rows based on the categories given.  Say on revenue category I have DAX which is sum of all sales.  Debtor days, I have another dax measure, and goes on and on. I know its easy to use it in excel because we can have a different formula on each rows. Is there any way to do it in power bi? Thanks!

rbalza_0-1619578479433.png

 

1 REPLY 1
amitchandak
Super User
Super User

@rbalza , You can have.

Like

Measure =

Switch(true() ,

max(Table[Category]) = "SRevenue" , Sum(Table[val1]) ,

max(Table[Category]) = "WIP Days" , Sum(Table[val2]) ,

Sum(Table[val3])

)

 

or

 

Measure =

Sumx(Table,

Switch(true() ,

(Table[Category]) = "SRevenue" , (Table[val1]) ,

(Table[Category]) = "WIP Days" , (Table[val2]) ,

(Table[val3])

))

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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