Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
99 | |
69 | |
46 | |
39 | |
33 |
User | Count |
---|---|
163 | |
110 | |
61 | |
51 | |
40 |