Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello 🙂
I am very new to Power BI and still learning.
I have been helped with most things on this forum from looking around, but iv faced an obstical i havent seen out there yet,
I need the % of shipmenst in total with just NI and just DT
And a % total with both NI and DT
These are types of shipments we get in our warehouse.
Please let me know if i need to post more information on the matter, first time poster
Solved! Go to Solution.
Hi,
I've created a sample demo file to showcase the measures you can use to accomplish your task.
Here is one of the measures - counting shipments with "NI" as the only value in Type column:
NI = CALCULATE( DISTINCTCOUNT(Data[Forsendelses nr]); FILTER( Data; CONTAINS( Data; Data[Forsendelses nr];[Forsendelses nr]; Data[Type];"NI" ) && NOT( CONTAINS( Data; Data[Forsendelses nr];[Forsendelses nr]; Data[Type];"DT" ) ) ) )
To count all shipments you can use the following measure:
Number of Shipments = CALCULATE(DISTINCTCOUNT(Data[Forsendelses nr]);ALL(Data))
Then calculation of "NI-only" shipments is straightforward:
% of NI = DIVIDE([NI];[Number of Shipments])
You can download a sample .pbix file here: http://blog.sqlgeek.pl/Download/DAX - Count with EXISTS.pbix.
Hi,
I've created a sample demo file to showcase the measures you can use to accomplish your task.
Here is one of the measures - counting shipments with "NI" as the only value in Type column:
NI = CALCULATE( DISTINCTCOUNT(Data[Forsendelses nr]); FILTER( Data; CONTAINS( Data; Data[Forsendelses nr];[Forsendelses nr]; Data[Type];"NI" ) && NOT( CONTAINS( Data; Data[Forsendelses nr];[Forsendelses nr]; Data[Type];"DT" ) ) ) )
To count all shipments you can use the following measure:
Number of Shipments = CALCULATE(DISTINCTCOUNT(Data[Forsendelses nr]);ALL(Data))
Then calculation of "NI-only" shipments is straightforward:
% of NI = DIVIDE([NI];[Number of Shipments])
You can download a sample .pbix file here: http://blog.sqlgeek.pl/Download/DAX - Count with EXISTS.pbix.
Wow Pawelpo!
This is relly good stuff 🙂
Thank you very mutch sir
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |