Forum Discussion
Measurement Calculations using Data from Two Different Tables & Model View Connection?
Hi,
I'm struggling to connect my data from two different tables for my measurement.
Can anyone help me with this?
9 Replies
- gadielsolisResolver III
Hello,
Not sure if I understand correctly,
My advice would be creating a separate table with the name of the suppliers and connect it to the fact tables to generate one to many relationships.
If you could share a dummy file with some examples it would be great for a better understanding.
- cgpahnkFrequent Visitor
Let me try creating a new table with the supplier names, but this is basically what my data looks like:
My "Amount Delivered" data is basically Units/Lbs, so what I'm trying to do is figure out how many Events happen per Unit/Lb (Amount Delivered)
EventID Supplier Name 1 Supplier A 2 Supplier A 3 Supplier A 4 Supplier B 5 Supplier B 6 Supplier B 7 Supplier B 8 Supplier B 9 Supplier B 10 Supplier C 11 Supplier C 12 Supplier D 13 Supplier D 14 Supplier D 15 Supplier D Amount Delivered Supplier Name 1551431 Supplier A 143454 Supplier A 16786 Supplier A 34 Supplier B 65342 Supplier B 32677 Supplier C 57777 Supplier C 32111 Supplier C 567788 Supplier D 22223 Supplier D 4456 Supplier D
- gadielsolisResolver III
Please try the following DAX:
Events vs Amount =VAR _Events= COUNTROWS(Events)VAR _Amount=SUM(Amounts[Amount Delivered])VAR _Events_vs_Amount=DIVIDE(_Amount,_Events)RETURN_Events_vs_AmountWorth to mentioning, I did not change the relationship therefore still using many to many relationship.
- cgpahnkFrequent Visitor
I'm trying to get a percentage though, so basically
Events per Supplier/Amount per Supplier
- cgpahnkFrequent Visitor
For example, if I took the amount of events I had (15) and divided it the total amount delivered*100 I'd get a percentage, what I want to figure out is how to display this percentage for each unique supplier.