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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

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 Partisan
Post Partisan

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
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.