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
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
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.