Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

calculations based on different data granularity

hello guys,

 

i need some help to resolve my issue with data at diffrent granularity, I have prepared pbix with data model and test data, which you can find at below link: https://ufile.io/0846h

 

I have 4 objects:

  • Date - standard date table
  • Products data
  • Sales - some product sales at day level
  • Discounts - product discounts value definied at month level for specific year

 

What I want to achive is to calculate following measure: (Total sales for given product) x (Product discount value at given time) - (Total costs for given product) x (Product discount % value at given time)

 

If I choose i.e. dates for 2018, I want to see calculated value for all products at month levels with posibility to slice by product and specific month and day

 

any ideas?

 

Regards

 

5 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      thanks for reply :) is there any other solution without using bi-directional relationships?

       

      Moreover, there was an mistake in provided model, because beside Val column in Discount table there should be also percentages values.. sorry for that, I have already extended model and updated the desired result