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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Laxman
Helper I
Helper I

Calculate basket sales of promotional products

Note: Updated post is here. I have resolved it myself.

 

https://community.fabric.microsoft.com/t5/Desktop/Calculate-filter-context-not-working-at-totals/td-...

 

Below data model has flaws and its resolved on above link!

 

Hi there,

I'm trying to calculate basket sales of Promotion items.

For example I need to find basket sales of promotion ProductID 1783 for 15th Jan 2023 which should be equivalent to TransactionID 9844 sales amount 43.

I need to present all this in Power BI in table format.

I have searched in Power BI community forum but could not find insights as to how this can be achieved.

Could you please help me write a measure for this.

 

Below is my data model and mock up data below.

 

Laxman_0-1685522038763.png

Laxman_1-1685522107108.png

Laxman_3-1685522182047.png

 

Laxman_2-1685522143858.png

The issue is somewhat similar to https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-sale-of-other-products-in-... . But my transactions are time bound. So I'm not able to apply this kind of solution.

 

Thank you in advance!

1 ACCEPTED SOLUTION
Laxman
Helper I
Helper I

Hi @VilmarSch @lbendlin 

I have updated data model as mentioned at https://community.fabric.microsoft.com/t5/Desktop/Calculate-filter-context-not-working-at-totals/td-...

and subsequently resolved the issue with measures posted in my reply.

 

Thank you both!

 

View solution in original post

6 REPLIES 6
Laxman
Helper I
Helper I

Hi @VilmarSch @lbendlin 

I have updated data model as mentioned at https://community.fabric.microsoft.com/t5/Desktop/Calculate-filter-context-not-working-at-totals/td-...

and subsequently resolved the issue with measures posted in my reply.

 

Thank you both!

 

Laxman
Helper I
Helper I

Thank you very much. Unfortunately I do not have luxury to combine all the data into one table. I have figured out alternative way to achieve this. I'm resolving a few issues related to grand totals there. I'll post the data model once its fixed.

VilmarSch
Post Patron
Post Patron

Seria isto? Se for, pbix aqui

 

Captura de tela 2023-06-02 204005.jpg

Thank you. May I know more about the solution please.

Click here to download the file

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.