Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I have a powerBI report where I show on the rows the company names and on columns the months, like below. Some companies like company B do not send me the overdues data every month :
JAN FEB MAR JUN JUL
Company A 10 15 30 20 22
Company B 5 8 10
I have a slicer that allows to show any months since jan 2021, here I selected only JAN to JUL 2023.
I want to have another slicer that alows me to exclude the companies that did not send data on the period shown on the table, and show only the company A and the others but not B. So if I select only JAN 2023 and FEB 2023, company B should appear as well as A, as I have received the data for these months in 2023.
How can I do this? Thanks in advance to this great community!
Solved! Go to Solution.
Hi @AliceFGX ,
I created a sample pbix file(see the attachment), please check if that is what you want.
Flag =
VAR _company =
SELECTEDVALUE ( 'Table'[Company] )
VAR _count =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Month] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Company] = _company )
)
VAR _tab =
SUMMARIZE (
ALLSELECTED ( 'Table' ),
'Table'[Company],
'Table'[Month],
"@count",
CALCULATE (
DISTINCTCOUNT ( 'Table'[Month] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Company] = EARLIER ( 'Table'[Company] )
)
)
)
RETURN
IF ( _count < MAXX ( _tab, [@count] ), 0, 1 )
Best Regards
Thank you!
Hi @AliceFGX ,
I created a sample pbix file(see the attachment), please check if that is what you want.
Flag =
VAR _company =
SELECTEDVALUE ( 'Table'[Company] )
VAR _count =
CALCULATE (
DISTINCTCOUNT ( 'Table'[Month] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Company] = _company )
)
VAR _tab =
SUMMARIZE (
ALLSELECTED ( 'Table' ),
'Table'[Company],
'Table'[Month],
"@count",
CALCULATE (
DISTINCTCOUNT ( 'Table'[Month] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Company] = EARLIER ( 'Table'[Company] )
)
)
)
RETURN
IF ( _count < MAXX ( _tab, [@count] ), 0, 1 )
Best Regards
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
26 |
User | Count |
---|---|
97 | |
87 | |
43 | |
40 | |
35 |