Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi,
This may be a simple solutuion, I dont use Power BI much. I'll include a sample of the issue. In a matrix, is there any way to only show rows if it has certain criteria?
Here is the underlying data
Here is the matrix:
I want to only show the highlighted ones because it has both alt and reg.
Thanks in advance.
Solved! Go to Solution.
Ah, I see... But always up for a challenge. Try this as a filter:
FILTER 2 =
IF (
CALCULATE (
DISTINCTCOUNT ( 'Table'[Payment Type] ),
ALLEXCEPT ( 'Table', 'Table'[Claim #] )
) = 2,
1,
IF ( MAX ( 'Table'[Payment Type] ) = "ALT", 1 )
)
Proud to be a Super User!
Paul on Linkedin.
Here is one way. Create an unrelated table using:
Reference table = SUMMARIZE('Table','Table'[Claim #],'Table'[Payment Type])
Create a measure to use as a filter in the visual:
Filter =
VAR _ALT =
CALCULATETABLE (
VALUES ( 'Reference table'[Claim #] ),
FILTER ( 'Reference table', 'Reference table'[Payment Type] = "ALT" )
)
VAR _ALL =
VALUES ( 'Table'[Claim #] )
RETURN
COUNTROWS ( INTERSECT ( _ALT, _ALL ) )
Cretae the visual and add the [Filter] measure to the filter pane for the visual and set the value to 1
Proud to be a Super User!
Paul on Linkedin.
Thank you for your help @PaulDBrown . Unfortunately, I cant create a new table because its connected to a live database. I appreciate your time!
Ah, I see... But always up for a challenge. Try this as a filter:
FILTER 2 =
IF (
CALCULATE (
DISTINCTCOUNT ( 'Table'[Payment Type] ),
ALLEXCEPT ( 'Table', 'Table'[Claim #] )
) = 2,
1,
IF ( MAX ( 'Table'[Payment Type] ) = "ALT", 1 )
)
Proud to be a Super User!
Paul on Linkedin.
@tangerinemdr15 , Try a measure like
Sumx(filter(summarize(Table, Table[Claim#], "_sum", sum(Table[Amount]) , "_cnt", calculate(DistinctCount(Table[Payment Type]), filter(Table, Table[Payment Type] in {"REG","ALT"} ))),[_cnt] =2), [_sum])
@amitchandak Thank you so much! that was perfect! I realized, though, that I needed to modify my question. what would be the measure for this result? I would like to see only those with ALT and Reg or only ALT. Sorry!
Hi,
Share the download link of your PBI file.
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.
| User | Count |
|---|---|
| 45 | |
| 43 | |
| 39 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 65 | |
| 31 | |
| 28 | |
| 24 |