cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
crashman
Frequent Visitor

Count right side of join where values not exist, null values

Hi,

 

I'm trying to count the right side join where values doesnt exist, in other words, where the relations is null.

 

This is the model, I need count the missing date in transactions, in this case is only 1 for 03/01/2021

 

 

crashman_0-1640127458710.png

 

 

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

Assuming the date in your matrix is a measure rather than a dimension, you should be able to write a measure for missing date like this:

missing dates =
COUNTROWS (
    FILTER ( 'Calendar', ISBLANK ( CALCULATE ( MAX ( Transactions[TransDate] ) ) ) )
)

View solution in original post

2 REPLIES 2
parry2k
Super User
Super User

@crashman try these measures, not sure if in the matrix you want to use date, since you are showing the summary at the person level, not person + date level

 

Total Days = COUNTROWS ('Calendar' )

Missing Days = [Total Days] - COUNTROWS (  SUMMARIZE ( 'Tran','Calendar'[Date] ) )

 

Follow us on LinkedIn

 

Learn about conditional formatting at Microsoft Reactor

My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

 

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





AlexisOlson
Super User
Super User

Assuming the date in your matrix is a measure rather than a dimension, you should be able to write a measure for missing date like this:

missing dates =
COUNTROWS (
    FILTER ( 'Calendar', ISBLANK ( CALCULATE ( MAX ( Transactions[TransDate] ) ) ) )
)

Helpful resources

Announcements
June 2022 update 768X460.jpg

Check it out!

Click here to read more about the June 2022 updates!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors