Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello Community -
TLDR; I am looking for a DAX measure that will calculate the total distinct count of companies in a column, while ignoring certain slicers on the page.
I am creating a dynamic text title that says something like "Company X ranks 13 out of 331 companies in Premium Written during the year." I am looking for a DAX formula that can help me count the total number of companies (331) for the year selected. The page has a Year slicer and a Company Name slicer. Therefore, the measure would need to ignore the Company Name slicer, but evaluate the Year selected.
So far, I have this, but it gives me the total count for all years, regardless of the Year selected:
Solved! Go to Solution.
@CMajka8 , use all, allselected, removefilters
PC Counts = CALCULATE( DISTINCTCOUNT('Data FACT'[PC]), all( 'Data FACT'))
or
PC Counts = CALCULATE( DISTINCTCOUNT('Data FACT'[PC]), allselecetd( 'Data FACT'))
https://www.linkedin.com/pulse/five-recent-power-bi-functions-you-should-use-more-often-amit-chandak
I think I've solved it - thanks for you help.
@CMajka8 , use all, allselected, removefilters
PC Counts = CALCULATE( DISTINCTCOUNT('Data FACT'[PC]), all( 'Data FACT'))
or
PC Counts = CALCULATE( DISTINCTCOUNT('Data FACT'[PC]), allselecetd( 'Data FACT'))
https://www.linkedin.com/pulse/five-recent-power-bi-functions-you-should-use-more-often-amit-chandak
Thank you. However, that appears to only give me a count of 1, based on the selction made in the Company Name slicer. I want to ignore that selection and get a total count of companies.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
26 | |
20 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
43 | |
19 | |
18 |