Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello,
You can find the pbix file related to my issue below here : https://we.tl/t-PusCT9Zjmc
I have two card visuals, one to show the distinct elements "machines" in the whole table, I do like this and it works fine :
NbDistinctTotal = calculate(DISTINCTCOUNT('Table'[machine]), all('Table')) + 0
I have a slicer on my page.
I have another measure where I want to display the distinct elements "machines", but only of the ones left after my "filters" are applied. It's like this :
NbDistinct = DISTINCTCOUNT('Table'[machine]) + 0
Pb : It takes into account the filter of my slicer but not the filter selected on my filter section (to the right of the power bi reports).
In the image below, when I select machine 1 in the filter on the right, I want my card NbDistinct to display the same value as shown in the filter beside each possible value (2, 1, 1). Instead of this, it remains written 3 (which is the number of distinct machine with the SiteName selected in the slicer).
I cannot upload my pbix sample file (do you know how to do it ?) so here is the code of queries :
Table :
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUUpUitWJVjICspLALGO4mAmcZQpkpYJZqDrS4DrSlWJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Colonne 1" = _t, #"Colonne 2" = _t]),
#"Type modifié" = Table.TransformColumnTypes(Source,{{"Colonne 1", type text}}),
#"Renamed Columns" = Table.RenameColumns(#"Type modifié",{{"Colonne 1", "machine"}, {"Colonne 2", "Location"}})
in
#"Renamed Columns"
Slicer :
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WysvPNVTSUUpUitUBc4yAnCQYxxjISVaKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Colonne 1" = _t, #"Colonne 2" = _t]),
#"Type modifié" = Table.TransformColumnTypes(Source,{{"Colonne 1", type text}, {"Colonne 2", type text}}),
#"Renamed Columns" = Table.RenameColumns(#"Type modifié",{{"Colonne 1", "SiteManager"}, {"Colonne 2", "SiteName"}})
in
#"Renamed Columns"
And here is the relationship between the two :
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 98 | |
| 72 | |
| 50 | |
| 50 | |
| 43 |