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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Jebilaya
Helper III
Helper III

Total from a table based on other filters

I'm trying to create a measure for a % total using a numerator and a denominator that will give me the total records but maintain the date filter that's in place.

 

I'm using:

numerator = countrows('FBS Fact Flexipod Manifest Outcome')

denominator = calculate(countrows('FBS Fact Flexipod Manifest Outcome'),all('FBS Fact Flexipod Manifest Outcome'))
 
The numerator works fine as it's applying the date filter as expected but the denominator is fixed to all of the flexipod manifest outcome table which I understand, but I can't find syntax to make it do all of the flexipod manifest outcome but maintain the date filter in place.  Any combination of allxcept, allselected doesn't seem to work.
2 REPLIES 2
Greg_Deckler
Super User
Super User

@Jebilaya Use ALLEXCEPT instead of ALL to maintain the date filter.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler  that's what I though i would need to use but it's still not working

 

Dax is now 

denominator = calculate(countrows('FBS Fact Flexipod Manifest Outcome'),allexcept('FBS Fact Flexipod Manifest Outcome', 'FBS Fact Flexipod Manifest Outcome'[Wincanton / Contractor], 'FBS Fact Flexipod Manifest Outcome'[Owner], 'FBS Fact Flexipod Manifest Outcome'[Store]))
 
But you can see from below the 825072 reported is all records but there are only 2,067 for the 31st and 1st Nov 

Jebilaya_0-1667395389010.png

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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