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 August 31st. Request your voucher.

Reply
rpar
New Member

Help needed on displaying closed cases while comparing todays data with yesterdays data extract

Hello everybody - Hope your having a great day !

 

Need your expert advise on the below scenario.

 

I have two table, Table 1 which is the new table extracted today being compared over table 2 extracted yesterday.

Both have the same set of primary key

Table1:

1 Orange

2 Orange

3 Orange

4 Orange

5 Orange

6 Banana

 

Table2 (yesterdays extract):

1 Orange

2 Orange

3 Orange

4 Orange

5 Orange

6 Banana

7 Orange

8 Orange

9 Banana

10  Banana

 

My questions is
When i create a matrix view for table1 it only shows the match count , but does not show the count that is not matched . In this case 7,8,9,10. It shows the table as below on KPI

 

Table 1

Orange 5

Banana 1

 Blank 4

 

I want to show these numbers against the Orange and Banace as they have been closed in table 1 without changing the count, it should be something like the below on KPI

 

Table 1

Orange 5 (Closed in previous 2)

Banana 1 (Closed in previous 2)

 

Any help would be great !

Thanks for your time and help !

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @rpar ,

 

Please try to add a relationship.

vxiaocliumsft_0-1731032692505.png

vxiaocliumsft_1-1731032704890.png

vxiaocliumsft_2-1731032720901.png

vxiaocliumsft_3-1731032734847.png

Best Regards,

Wearsky

 

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @rpar ,

 

Please try to add a relationship.

vxiaocliumsft_0-1731032692505.png

vxiaocliumsft_1-1731032704890.png

vxiaocliumsft_2-1731032720901.png

vxiaocliumsft_3-1731032734847.png

Best Regards,

Wearsky

 

 

thanks this helped !

Sahir_Maharaj
Super User
Super User

Hello @rpar,

 

Can you please try this approach:

Closed_Display_Combined = 
VAR CurrentCategory = SELECTEDVALUE(Table1[Category])
VAR CurrentCount = 
    CALCULATE(
        COUNTROWS(Table1),
        Table1[Category] = CurrentCategory
    )
VAR ClosedCount = 
    CALCULATE(
        COUNTROWS(Table2),
        Table2[Category] = CurrentCategory,
        NOT Table2[PrimaryKey] IN VALUES(Table1[PrimaryKey])
    )
RETURN
IF(
    ClosedCount > 0,
    FORMAT(CurrentCount, "#") & " (Closed in previous " & FORMAT(ClosedCount, "#") & ")",
    FORMAT(CurrentCount, "#")
)

Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

Thanks for taking time out @Sahir_Maharaj !
Tried the above query , it still shows the full count of table 1 and not the desired closed count of table 2 (4 in this example). Even if am able to get the output of 4 thats fine .

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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