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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

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

 

1 ACCEPTED SOLUTION
SaumyaShetty
Frequent Visitor

Hi,

 

Please check the file int the below link.Does this suffice your requirement.

https://uploadfiles.io/

 

 

 

Regards,

Saumya Shetty

View solution in original post

5 REPLIES 5
SaumyaShetty
Frequent Visitor

Hi,

 

Please check the file int the below link.Does this suffice your requirement.

https://uploadfiles.io/

 

 

 

Regards,

Saumya Shetty

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

Hi,

 

The download link in your orogonal post does not work.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

it should not be a problem with link from my original post, please find below the same file uploaded on dropbox:

 

https://www.dropbox.com/s/259epccwbv7c247/discounts.pbix?dl=0

 

 

Regards!

Hi,

 

In the Discount table, the %val column should be a % column.  In your file, it is a text column.  In the Query Editor make that change and share the download link again.  Also, in a simple table, show the exact result you are expecting.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.