Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Chajtek
Regular Visitor

Total of Measures from different table w/o relation

Hello guys, I have a problem with creating Total Measure for Stock Out2 Measure.

 

I did something like this:

 

Chajtek_0-1594143526692.png

 

 

Where Date is not related to any other column.

Chajtek_1-1594143538811.png

 

 

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.2010ABC1
01.01.2010BCD1
05.01.2010ABC1

 

 

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!

1 ACCEPTED SOLUTION
v-zhenbw-msft
Community Support
Community Support

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])

 

Total1.jpg

 

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.

View solution in original post

2 REPLIES 2
v-zhenbw-msft
Community Support
Community Support

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])

 

Total1.jpg

 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.