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.
Hi,
I'm trying to create a measure where I need to generate a yes or no message to display in a card, based on the selection in 2 columns/slicers, and whether the results in the third column/rows (CSC) match each other or not (based on these 2 seperate selections)
The first column (Postcode Sector) has duplicate values and the second column (Branch Number) has many blanks.
I'm new to Power BI, so any help is appreciated.
Thanks in advance.
Solved! Go to Solution.
This won't work. As I mentioned earlier, you need to have each slicer from a separate disconnected table. You need to create two tables (SlicerTable1 and SlicerTable2). Both of them would be
ALLNOBLANKROW ( 'Table'[Postcode Selector] )
then your measure would be
=
IF (
ISEMPTY (
EXCEPT (
CALCULATETABLE (
VALUES ( 'Table'[CSC] ),
TREATAS (
VALUES ( SlicerTable1[Postcode Selector] ),
'Table'[Postcode Selector]
)
),
CALCULATETABLE (
VALUES ( 'Table'[CSC] ),
TREATAS (
VALUES ( SlicerTable2[Postcode Selector] ),
'Table'[Postcode Selector]
)
)
)
),
"Yes",
"No"
)
Hi @tamerj1
Thanks for the response, unfortunately that didn't work. I added the measure to a card, selected CF83 3 for the postcode sector in the first slicer, and then selected branch 2810 in the second slicer (based on the data in the snapshot above), and the result was "Yes" when it should have been No, as "Cardiff" and "Bolton" don't match.
Apparently I misunderstood the requirement. However, I'm now confused about the setup of your report visuals and slices and how did you setup the interactions between the visuals.
you my however try
IF (
MAXX ( FILTER ( ALL ( 'Table' ), 'Table'[Postcode Selector] = SELECTEDVALUE ( 'Table'[Postcode Selector] ) ), 'Table'[CSC] )
= MAXX ( FILTER ( ALL ( 'Table' ), 'Table'[Branch Number] = SELECTEDVALUE ( 'Table'[Branch Number] ) ), 'Table'[CSC] ),
"Yes",
"No"
)
otherwise you might require to to have both slicer column each in a separate disconnected table.
Hi @tamerj1 , I have my visuals set up as below. I have disabled the interaction between these 2 slicers so a branch number, and postcode can be selected individually. I placed 2 tables below to display the supporting CSC based on the selected branch/postal sector. I have tried your measure, and it didn't work. Appreciate the response.
This won't work. As I mentioned earlier, you need to have each slicer from a separate disconnected table. You need to create two tables (SlicerTable1 and SlicerTable2). Both of them would be
ALLNOBLANKROW ( 'Table'[Postcode Selector] )
then your measure would be
=
IF (
ISEMPTY (
EXCEPT (
CALCULATETABLE (
VALUES ( 'Table'[CSC] ),
TREATAS (
VALUES ( SlicerTable1[Postcode Selector] ),
'Table'[Postcode Selector]
)
),
CALCULATETABLE (
VALUES ( 'Table'[CSC] ),
TREATAS (
VALUES ( SlicerTable2[Postcode Selector] ),
'Table'[Postcode Selector]
)
)
)
),
"Yes",
"No"
)
Another question please, how do I display blank or 0 in the card if nothing is selected in the filters? Thanks
=
IF (
NOT ISFILTERED ( SlicerTable1[Postcode Selector] )
&& NOT ISFILTERED ( SlicerTable2[Postcode Selector] ),
"",
IF (
ISEMPTY (
EXCEPT (
CALCULATETABLE (
VALUES ( 'Table'[CSC] ),
TREATAS (
VALUES ( SlicerTable1[Postcode Selector] ),
'Table'[Postcode Selector]
)
),
CALCULATETABLE (
VALUES ( 'Table'[CSC] ),
TREATAS (
VALUES ( SlicerTable2[Postcode Selector] ),
'Table'[Postcode Selector]
)
)
)
),
"Yes",
"No"
)
)
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 |
---|---|
17 | |
10 | |
10 | |
8 | |
6 |
User | Count |
---|---|
18 | |
16 | |
15 | |
12 | |
10 |