Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I've recently been tasked with moving some of my Tableau Dashboards over to Power BI and like a lot of the users on here, I'm struggling getting some stuff involving LOD's to function in DAX. It's pretty frustrating. Here's my current issue that I've been stuck on for way to long;
In Tableau: I have an LOD function; { FIXED [Facility]: COUNTD(if [Source_System]='Online' then [Id] end)}
it just counts the number of distinct ids for each facility where the user purchased online. I then take this measure and add it to the filters card and set it to 'where > 10'. This way I can filter out any facility that has less than 10 online orders
In PowerBI: I thought I got the calculation right;
Solved! Go to Solution.
Hello @Anonymous
this measure won't work as a filter as it returns always a distinct count meaning a scalar value. And single scalar value can't not filtered. So you have to apply this formula as a new column in your data table and then using this new column as filter.
Hope this helps
Jimmy
Hi @Anonymous ,
My recommendation is to not punch your head against the wall 😉
In PowerBI, you can filter on Measures only in a Visual filter. To achieve what you want, you could create a Calculated Table with a summarize function to get a two column table with Facilities and their distinctcounts of Orders. You can then use that to put a filter on the Page or even Report level.
However, on a single visual you can filter on a measure. For example; I have a table visual with all categories of products and I want to filter out all categories where the distinct amount of corresponding products is bigger than 3. My measure is:
DistinctCount of Products in subcategory = DISTINCTCOUNT(DimProduct[ProductKey])
My table visual looks like this:
By dragging the measure to the filterpane and select "greater then 3", it will filter out all categories with 3 or less products. (in the following table visual, I have removed the measure as a column to demonstrate that it doesn't need to be visible in the Table visual to be filtered on):
Note that in PowerBI, a Slicer is a filter like any other filter. If you report contains a slicer on Facility you could add the measure to the Slicer Visual filter to not show any options where count<10. If you need the page or report filter, you will need to create a calculated table with distinct facilities and their corresponding IDs, create 1*many relationships from the calculated table to your fact/dim table and use that as a filter in the filter pane. In my example, the code would be something like this:
SubCategoriesWithDistinctCountsOfProducts = SUMMARIZECOLUMNS(DimProduct[ProductSubcategoryKey], "CountOfProducts", DISTINCTCOUNT(DimProduct[ProductKey]))
Let me know if this helps you out 🙂
Kind regards
Djerro123
-------------------------------
If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.
Keep those thumbs up coming! 🙂
Proud to be a Super User!
Thank you for the detailed response. I'm going to give this a try this evening and see if it produces the desired affect.
-Micah
No Problem, just don't forget to mark it as a solution if it does fit your needs (more than 1 response can be your solution) for others with similar questions to find the answer quickly.
Kind regards
Djerro123
-------------------------------
If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.
Keep those thumbs up coming! 🙂
Proud to be a Super User!
Hello @Anonymous
this measure won't work as a filter as it returns always a distinct count meaning a scalar value. And single scalar value can't not filtered. So you have to apply this formula as a new column in your data table and then using this new column as filter.
Hope this helps
Jimmy
Thank you Jimmy! this worked and glad to know I was at least on the right track.
I really appreciate your help with this!
-Micah
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |