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

Dax Percentage formula across multiple columns

Hi!

 

I'm struggling to create a formula that can give me a % result when filtered by any combination of three other columns. 

 

Here is a mockup of my table:

 

LocationFiscal Year+Month+NameSKUValue
Country A2019-P08-FebProduct A0
Country A2019-P09-MarProduct A3
Country A2019-P10-AprProduct A22
Country A2019-P11-MayProduct A2
Country A2019-P12-JunProduct A0
Country A2020-P01-JulProduct A0
Country A2020-P02-AugProduct A0
Country A2020-P03-SepProduct A0
Country A2020-P04-OctProduct A0
Country A2020-P05-NovProduct A0
Country A2020-P06-DecProduct A22
Country A2020-P07-JanProduct A13
Country A2020-P08-FebProduct A0
Country A2020-P09-MarProduct A0
Country B2019-P08-FebProduct A0
Country B2019-P09-MarProduct A0
Country B2019-P10-AprProduct A0
Country B2019-P11-MayProduct A0
Country B2019-P12-JunProduct A0
Country B2020-P01-JulProduct A0
Country B2020-P02-AugProduct A0
Country B2020-P03-SepProduct A0
Country B2020-P04-OctProduct A0
Country B2020-P05-NovProduct A0
Country B2020-P06-DecProduct A1
Country B2020-P07-JanProduct A0
Country B2020-P08-FebProduct A0
Country B2020-P09-MarProduct A0
Country B2019-P08-FebProduct B2
Country B2019-P09-MarProduct B4
Country B2019-P10-AprProduct B7
Country B2019-P11-MayProduct B9
Country B2019-P12-JunProduct B0
Country B2020-P01-JulProduct B0
Country B2020-P02-AugProduct B0
Country B2020-P03-SepProduct B0
Country B2020-P04-OctProduct B0
Country B2020-P05-NovProduct B0
Country B2020-P06-DecProduct B4
Country B2020-P07-JanProduct B0
Country B2020-P08-FebProduct B0
Country B2020-P09-MarProduct B0

 

And here are some examples of the results I want to formula to show:

CountryProductMonthNo SKUsNo LocationsNo. MonthsNo. of Values > 0No. of Values = 0% result:
AAALL111451436%
BAALL11141147%
A&BAALL122852318%
BA&BALL212862221%
AA2019-P09-Mar11110100%
AA2019-P08-Feb & 2019-P09-Mar1121150%
BA&B2019-P10-Apr1211050%
A&BA2020-P06-Dec & 2020-P07-Jan1223175%
A&BA&B2020-P06-Dec & 2020-P07-Jan2224267%
BA&B2020-P06-Dec & 2020-P07-Jan2122250%
ALLALLALL2242113126%

 

 

I feel like this should be simple but I've tried a few different things and so far no luck.

 

Do I need to create multiple formulae e..g one for Location and one for Month, or is it possible to do all in one?

 

Thank you!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

Try a measure like this

divide(sumx(table,if(Table[Value]>0,1,0)),count(Table[Value]]))
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

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

Try a measure like this

divide(sumx(table,if(Table[Value]>0,1,0)),count(Table[Value]]))
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

Amazing, thank you!  

 

Plugged the formula in and suddenly my charts are making a lot more sense 🙂

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.

Top Solution Authors