We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hello guys,
I have two tables "Suppliers" and "Not Active Supplier".
I have a calculated function with which I evaluate suppliers from my "Suppliers" table to arrive at a count. However, I would like to evaluate those suppliers, excluding those in the "not Active Supplier" table, but I do not know how to include the EXCEPT function in my formula as I've been getting errors. Here's the calculated measure I used (without excluding "Not Active Suppliers")
Active Suppliers =
CALCULATE (
DISTINCTCOUNT ( [Suppliers.Supplier ID] ),
contract_terminated[Terminated] = "Yes",
LEFT ( contract_terminated[Reason], 3 ) <> "Yes"
)
I'm new to DAX and any help would be appreciated. Thanks!
Here is what the data model looks like:
Data Model
Hi guys,
Thanks for you help, unfortunately I couldn't make them work with my model. I has to manually filter the visuals with the Supplier ID as it seems to work for the time being.
Best regards,
Hi @Anonymous ,
Do you try the ways that Ashish_Mathur and Vvelarde suggests? If they are helpful, please accept them as solutions. Welcome to share your own solutions. Others who have the same request will benefit from this thread.
If you have other questions, please feel free to ask us.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Here's one way.
=CALCULATE(DISTINCTCOUNT(Suppliers[Supplier ID]),Suppliers[Inactive suppliers]=BLANK())
Hope this helps.
@Anonymous
Try with this:
CALCULATE (
DISTINCTCOUNT ( [Suppliers.Supplier ID] ),Filter (EXCEPT(Suppliers, Not Active Suppliers),
contract_terminated[Terminated] = "Yes",
LEFT ( contract_terminated[Reason], 3 ) <> "Yes"
)Regards
Victor
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 54 | |
| 39 | |
| 32 | |
| 17 | |
| 15 |
| User | Count |
|---|---|
| 64 | |
| 63 | |
| 37 | |
| 36 | |
| 22 |