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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

TOTALYTD Excluding items when they don't occur in a given month

TOTALYTD is not giving the result i would expect it to.  When i write this measure;

 

COUNT YTD = TOTALYTD(COUNT(Sheet1[BRAND]),Sheet1[MONTH])
 
It gives me the correct total YTD for my data, but when i introduce the Brand dimension to a matrix table (or any table) it does not show the count for a brand that didn't occur in the selected month
 
Example data below.  The BRAND/MONTH columns are what is being summarized in .pbix.  As you can see, there are 0 instances of "FRUIT LOOPS" in February 2020.  The total YTD of all brands should be 19.
Swinden_0-1622476110420.png

 

 When i interpret this in Power BI, it gives the correct total, but excludes Fruit Loops as there was no instances in February
Swinden_1-1622476196235.png

 

Any tips?

 
1 ACCEPTED SOLUTION

Hey @Anonymous ,

 

the problem is or was that you don't use a proper date table.

Most of the time intelligence functions work only if you have a date table. I integrated a date table and now it works like a charm:

selimovd_0-1622492746007.png

 

I will send you the file in private.

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

6 REPLIES 6
selimovd
Super User
Super User

Hey @Anonymous ,

 

can you share your file?

Usually that shouldn't happen.

 

Best regards

Denis

Anonymous
Not applicable

Long time reader, first time poster... dumb question, but how can I share .pbix?

Hey @Anonymous ,

 

you have to use an external service like OneDrive or I prefer swisstransfer.com

 

Best regards

Denis

Hey @Anonymous ,

 

the problem is or was that you don't use a proper date table.

Most of the time intelligence functions work only if you have a date table. I integrated a date table and now it works like a charm:

selimovd_0-1622492746007.png

 

I will send you the file in private.

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 
Anonymous
Not applicable

Thank you!  I had to change some relationships and measures, but it works when i add the data table and made a few other tweaks. Thanks so much for your help!

Hey @Anonymous ,

 

I'm happy it works now 😊

Have a great day.

 

Best regards

Denis

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.