Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. 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 !
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
75 | |
60 | |
37 | |
33 |
User | Count |
---|---|
102 | |
56 | |
52 | |
45 | |
40 |