Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hello! I am trying to write a switch statement (or an if statement), but it's not working correctly.
I want to create an equation/statement that takes the number for the minimum no of tms (the value) and if the count of employees with a score (in the colors) greater than 3 is the minimum no of tms or greater, then yes, but if not, no. (something like: if (count(employee name) with score >= 3 is greaterthan or equal to minumum number of tms, yes, no)
But I'm not sure how to write that in DAX. Would it be a double if statement? Thanks in advance
Hey @nataliesmiy1357 ,
please create a pbix file that contains sample data, but still reflects your data model (tables, relationships, calculated columns, measures), of course only the objects are important that circle around the challenge you are facing. Upload the pbix file to onedrive or dropbox and share the link. If you are using Excel to create the sample data instead of the manual input method, share the Excel file as well.
Describe the expected result based on the sample data you provide.
Regards,
Tom
Tom - here is the link to my pbix file.
This is the idea I'm thinking: (something like: if (count(employee name) with score >= 3 is greaterthan or equal to minumum number of tms, yes, no)
Also, here is a screenshot of what it should be (the yes's and no's)
Hey @nataliesmiy1357 ,
the link you provided is not the link to pbix file, but instead it points to the report in your power bi tenant. As I'm not a member of your tenant, I can't access the report.
Regards,
Tom
Tom - does this work instead?
No, I can't access your tenant.
It looks like my company won't share..... so let's try another way.... how can I create an if statement with two things, then...
if (a and b) then ___
Hey @nataliesmiy1357 ,
using Power Query (M) here is a M snippet
if [Dim1] = "A" and [Dim2] = "B" then "this" else "that"
and the same using DAX to create a calculated column
if ( ( 'Table'[Dim1] = "A" && 'Table'[Dim2] = "B" ), "this" , "that" )
If this does not help consider creating a pbix using Power BI Desktop and uploading the file to your private onedrive or dropbox account (this is how most of us share files).
Regards,
Tom
That idea works yes - but I'm having trouble putting it into my report. It unfilters everything when I put that measure into the table. It's not grouping the data like I wanted....
Hi @nataliesmiy1357 ,
I think your logic is
if (count(employee name) with score >= 3 is greaterthan or equal to minumum number of tms, yes, no)
I am confused about your countof [EmployeeName] or current [ProficiencyNumber] will multiply by 3.
I couldn't find V_TM_ModulePowerBI[ProficiencyNumber] and V_TM_ModulePowerBI[EmployeeName] in your screenshot. Please show me a screenshot of your table. This will make it easier for us to understand your requirement.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 76 | |
| 38 | |
| 31 | |
| 27 | |
| 26 |