Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello Fabric Community,
I need some assistance in solving a calculation I am attempting. So I am trying to count Name column in one of my tables called "MasterList" based on filters across multiple tables and columns (that all i have relationships to each other). However the logic I need to use is that the calculation counts if either of the filter is true, not when every single filter is true. Here is the code I am using:
Solved! Go to Solution.
I will have to ask you to provide samples of the MasterList table and at least two of the other participating dimension tables.
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
use || or IN function to achieve that.
Hello,
Thank you for your response. I have not used IN funtion prior to this, may I get some hint on how to write this statement? Thank you.
It doesn't apply in your scenario. You would use the || operator
NON COMPLIANT = calculate(distinctcount(MasterList[Name]),
AD[In SCCM]="No" ||
SCCM[In AD]="No" ||
Defender[Onboarded]="No" ||
Purview[Onboarded]="No" ||
InTune[Onboarded]="No" ||
MasterSecureBaseline[State] ="Yes")
You may need aggregations - depends on your setup.
Hello,
I tried this code and the errorI recieve is below:
"The expression contains columns from multiple tables, but only columns from a single table can be used in a True/False expression that is used as a table filter expression."
Fair enough. In that case do a distinctcount over the Union of these tables.
NON COMPLIANT = distinctcount(union(
Filter(Values(MasterList[Name]),AD[In SCCM]="No"),
Filter(Values(MasterList[Name]),SCCM[In AD]="No"),
Filter(Values(MasterList[Name]),Defender[Onboarded]="No"),
Filter(Values(MasterList[Name]),Purview[Onboarded]="No" ),
Filter(Values(MasterList[Name]),InTune[Onboarded]="No"),
Filter(Values(MasterList[Name]), MasterSecureBaseline[State] ="Yes")
))
Sir, this is the error I recicved:
fair enough
NON COMPLIANT = countrows(distinct(union(
Filter(Values(MasterList[Name]),AD[In SCCM]="No"),
Filter(Values(MasterList[Name]),SCCM[In AD]="No"),
Filter(Values(MasterList[Name]),Defender[Onboarded]="No"),
Filter(Values(MasterList[Name]),Purview[Onboarded]="No" ),
Filter(Values(MasterList[Name]),InTune[Onboarded]="No"),
Filter(Values(MasterList[Name]), MasterSecureBaseline[State] ="Yes")
)))
Hello Sir, thank you for your assistance. Witht his new DAX commands, I get below error:
And for clarification, I did chnage the table name from MasterSecureBaseline to SBMissing as that is table I need to use. I I did do summarization on the State column in the SBMissing table and others as well:
Thank you.
I will have to ask you to provide samples of the MasterList table and at least two of the other participating dimension tables.
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Hello,
Thank you. I was able to get desired results by calculating a SUM on each measure from the table and made a new measure. Thank you for your help.
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 |
---|---|
10 | |
9 | |
8 | |
8 | |
8 |
User | Count |
---|---|
13 | |
12 | |
11 | |
10 | |
8 |