Forum Discussion
Anonymous
7 years agoNot applicable
Diving two columns from different tables that cannot be summed up
Hi all, I have a master table for products with their expiry date(in days). For eg 180 days I have a stocks table for products with their manufacture date.(same products will have different manufa...
- 7 years ago
You can totally create a measure, just don't create one that sums up the values.
I'm assuming you have some sort of productID that relates from the master table to the stocks table.
Without knowing your table structure, your measure would look something like this:
Expiration% = DATEDIFF(TODAY(), SELECTEDVALUE(Stocks[ManufactureDate]), DAY)/ SELECTEDVALUE(Master[ExpiryLength])
Put this in a table with your list of items from the Stocks table, and it should give you correct values.
Cmcmahan
Resident Rockstar
7 years agoYou can totally create a measure, just don't create one that sums up the values.
I'm assuming you have some sort of productID that relates from the master table to the stocks table.
Without knowing your table structure, your measure would look something like this:
Expiration% = DATEDIFF(TODAY(), SELECTEDVALUE(Stocks[ManufactureDate]), DAY)/ SELECTEDVALUE(Master[ExpiryLength])
Put this in a table with your list of items from the Stocks table, and it should give you correct values.
- Anonymous7 years agoNot applicable