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,
I would like to use distinct count which excludes the values in 2 filters
Here are the 2 filters :
Filter(all(table), LEFT(Table[ColumnName],1)="R")
Filter(all(table), LEFT(Table[ColumnName],2)="CR")
| ColumnName |
| R0000ER23 |
| R0000ER25 |
| R0000ER22 |
| CR099DF12 |
| CR099CV12 |
| CR099ER34 |
| CR099ER40 |
| WP000022 |
| WP000023 |
| WP000023 |
The return result should be 2 (WP000022, WP000023).
Thank you in advance.
Tg
Solved! Go to Solution.
@vnqtrang , Try like
Measure = distinctCOUNT(Table[ColumnName]) -
calculate(distinctCOUNT(Table[ColumnName]), Filter((table), LEFT(Table[ColumnName],1)="R" || LEFT(Table[ColumnName],2)="CR") )
Measure =
calculate(distinctCOUNT(Table[ColumnName]), Filter((table), not( LEFT(Table[ColumnName],1)="R" || LEFT(Table[ColumnName],2)="CR")) )
or
Measure =
calculate(COUNT(Table[ColumnName]), Filter((table), not( LEFT(Table[ColumnName],1)="R" || LEFT(Table[ColumnName],2)="CR")) )
@vnqtrang , Create this measure and plot it with columnname
calculate(distinctCOUNT(Table[ColumnName]), Filter((table), LEFT(Table[ColumnName],1)="R" || LEFT(Table[ColumnName],2)="CR") )
This one shows the filtered values. I would like to count the other values except these 2 filtered values. Hope I clear enough.
@vnqtrang , Try like
Measure = distinctCOUNT(Table[ColumnName]) -
calculate(distinctCOUNT(Table[ColumnName]), Filter((table), LEFT(Table[ColumnName],1)="R" || LEFT(Table[ColumnName],2)="CR") )
Measure =
calculate(distinctCOUNT(Table[ColumnName]), Filter((table), not( LEFT(Table[ColumnName],1)="R" || LEFT(Table[ColumnName],2)="CR")) )
or
Measure =
calculate(COUNT(Table[ColumnName]), Filter((table), not( LEFT(Table[ColumnName],1)="R" || LEFT(Table[ColumnName],2)="CR")) )
Thank you !
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 | |
| 38 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 67 | |
| 66 | |
| 31 | |
| 28 | |
| 24 |