Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Solution implemented was using default functionality of the new slicer visual.
Solution implemented was using default functionality of the new slicer visual.
Hi @smileamile2,
Could you please confirm if this issue has been resolved? If it has, kindly mark it as the solution and share the details in the community to help other members.
Thank you.
Hi @smileamile2
,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
Hi @smileamile2,
Thank you for posting your query in the Microsoft Fabric Community Forum.
May I ask if you have resolved this issue? If so, please mark it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @smileamile2
You can unpivot all other columns but Color in the query editor so Status and State values are in one column or you can use a disconnected table and use a measure as a visual filter.
Filter =
CALCULATE (
COUNTROWS ( 'Table' ),
KEEPFILTERS (
'Table'[Status]
IN VALUES ( StatusOrState[Value] )
|| 'Table'[State] IN VALUES ( StatusOrState[Value] )
)
)
Please see the attached sample pbix.
HI @smileamile2
Please update your formula to this:
Filter =
VAR _VALUES =
UNION ( VALUES ( StatusOrState[Value] ), { BLANK () } )
VAR _VALUES2 =
VALUES ( StatusOrState[Value] )
RETURN
IF (
NOT ( ISFILTERED ( StatusOrState[Value] ) ),
CALCULATE (
COUNTROWS ( 'Table' ),
KEEPFILTERS ( 'Table'[Status] IN _VALUES || 'Table'[State] IN _VALUES )
),
CALCULATE (
COUNTROWS ( 'Table' ),
KEEPFILTERS ( 'Table'[Status] IN _VALUES2 || 'Table'[State] IN _VALUES2 )
)
)
Please see updated pbix.
x
hI @smileamile2
Include an additional condition to check if the count of the selected values matches the total count when no selection is made. Try this:
Filter =
VAR _VALUES =
UNION ( VALUES ( StatusOrState[Value] ), { BLANK () } )
VAR _VALUES2 =
VALUES ( StatusOrState[Value] )
VAR _ALL_SELECTED_TEST = COUNTROWS(ALL(StatusOrState)) = COUNTROWS(StatusOrState)
RETURN
IF (
NOT ( ISFILTERED ( StatusOrState[Value] ) ) || _ALL_SELECTED_TEST,
CALCULATE (
COUNTROWS ( 'Table' ),
KEEPFILTERS ( 'Table'[Status] IN _VALUES || 'Table'[State] IN _VALUES )
),
CALCULATE (
COUNTROWS ( 'Table' ),
KEEPFILTERS ( 'Table'[Status] IN _VALUES2 || 'Table'[State] IN _VALUES2 )
)
)
Thanks for danextian and Ashish_Mathur's concern about this issue.
Hi, @smileamile2
Please try the following DAX:
Filter =
VAR _VALUES =
UNION ( VALUES ( StatusOrState[Value] ), { BLANK () } )
VAR _VALUES2 =
VALUES ( StatusOrState[Value] )
RETURN
IF (
NOT ( ISFILTERED ( StatusOrState[Value] ) ),
CALCULATE (
COUNTROWS ( 'Table' ),
KEEPFILTERS ( 'Table'[Status] IN _VALUES || 'Table'[State] IN _VALUES )
),
IF (
COUNTROWS ( _VALUES2 ) = 1,
CALCULATE (
COUNTROWS ( 'Table' ),
KEEPFILTERS ( 'Table'[Status] IN _VALUES2 || 'Table'[State] IN _VALUES2 )
),
CALCULATE (
COUNTROWS ( 'Table' ),
KEEPFILTERS ( 'Table'[Status] IN _VALUES2 && 'Table'[State] IN _VALUES2 )
)
)
)
Output:
I have attached the pbix file for that example below, I hope it helps!
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
x
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 36 | |
| 33 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 73 | |
| 72 | |
| 38 | |
| 35 | |
| 26 |