Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi,
I would like to count the Met/Not Met category I have developed for transit times and lead times. One complication is that these categories are on different excel files.
Here's images of the model:
The file 'Ocean Shipment Tracker' has individual shipment data, including transit times, whereas 'Ocean LT' has planning lead times (named 85% Confidence here) according to lane name. The two files are connected using lane names. (This means there are multiple transit times associated with each lane name, but only one planning lead time associated with each lane name.)
Here's the code I am using right now (I am new to DAX and PowerBI, so if there is a more efficient way of doing this, please let me know!):
Ocean Met =
Var a =
SUM('Ocean Shipment Tracking'[Actual transit time])
Var b =
SUM('Ocean LT'[85% Confidence])
Return
IF(a<b, "Met","Not Met")
This allows me to add a column in a table, but I can't figure out how to get a count of "Met" shipments:
(the third column 'Recommended Planning LT' is the '85% Confidence')
When I try to put this into a card, I get "Not Met". Under 'Fields', there is no option for 'Count'.
Any help on counting Met/Not Met would be greatly appreciated.
Thank you!
That data model looks suspicious. Please familiarize yourself with the concept of "fact" and "dimension" tables, and how they should be linked. Usually you do not want to directly connect two fact tables, and especially not via a M:M bidirectional connection.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
19 | |
15 | |
13 | |
11 | |
9 |
User | Count |
---|---|
25 | |
22 | |
12 | |
11 | |
10 |