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 guys, I have a problem with creating Total Measure for Stock Out2 Measure.
I did something like this:
Where Date is not related to any other column.
What I wanted to achieve was to have matrix of Date X Item No., so for 1 month and 30 item I have 900 rows - and thats okay (they are alerady filtered Stock Out = 1).
After that I calculated my Measure: Stock Out 2 based on (I think that is not importnant right now) other fields.
And now finally I want to create Card of Total Stock Outs. I can not do this by SUMMARIZE or COUNTROWS because sometimes I have something like this:
Calendar[Date] | Items[No_] | StockOut2 |
01.01.2010 | ABC | 1 |
01.01.2010 | BCD | 1 |
05.01.2010 | ABC | 1 |
I want to see 3 - just a simple SUM of Stock Out Measure which is already on my visual table. I can explain it a little bit more if You need.
Main problem is that I can not force PowerBi to take Calendar[Date] x Items[No_] as my let's say from SQL 'key' and count this.
StockOut is 0 or 1 value so we can use Countrows or count this field, it does not matter.
Thanks for help!
Solved! Go to Solution.
Hi @Chajtek ,
Do you want to get the correct total of Stock Out2 Measure?
If it is your requirement, we can use SUMX function to meet your requirement.
The result like this,
Stock_OUT 2 = SUMX(VALUES('Table'[Calendar[Date]]]),[Stock_OUT])
If it doesn’t meet your requirement, could you please provide a mockup sample based on fake data or describe the fields of each tables and the relations between tables simply?
It will be helpful if you can show us the exact expected result based on the tables.
Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Chajtek ,
Do you want to get the correct total of Stock Out2 Measure?
If it is your requirement, we can use SUMX function to meet your requirement.
The result like this,
Stock_OUT 2 = SUMX(VALUES('Table'[Calendar[Date]]]),[Stock_OUT])
If it doesn’t meet your requirement, could you please provide a mockup sample based on fake data or describe the fields of each tables and the relations between tables simply?
It will be helpful if you can show us the exact expected result based on the tables.
Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank You.
It worked.
Mateusz
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |