cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
BudMan512
Helper IV
Helper IV

Sales between Tuesdays and Fridays

Hi All,

I am working on a Matrix with columns for several different branches and their gallons sold for May.  The report needs the gallons delivered between each Tuesday and Friday. I have two issues I would appreciate help with.

First, the below screenshot contains each Tuesday and Friday of the month but I also need the gallons for the final days of the month which could be several days after the last Tuesday or Friday.   In May there was only one day left, Wednesday but other months vary.

Here is the DAX I have been trying to get beyond.

TUES-FRI =

CALCULATE([MTD Gallons],

FILTER('Calendar',

'Calendar'[Day of wk] = "TUE" || 'Calendar'[Day of wk]= "FRI"))

 

 

BudMan512_0-1688662938188.png

Secondly, I currently have the Month to Date gallons for each branch.  What I need is the gallons delivered between each Tues and Fri.  So in the May data, the first day tracked is Tuesday May 2. In this case I am able to use the MTD values.  But I would like help calculating the other values from  Friday May 5th and beyond.  There is an additional challange at the end of the month. I need the gallons from the final Tue/Friday to the last day of the month as well with total gallons for the month at the bottom.

Here is what I have for DAX so far for this.  

MTD Gallons =

CALCULATE(sumx(history,

History[QTY] * History[INV_MULTIPLIER]),

DATESMTD('Calendar'[Calendar]))

 

I have several hours of work into this but have not been able to get any further.  Any help would be appreciated.

Here is a screenshot of the model.

BudMan512_1-1688664868607.png

 

Thanks much,

Bud

 

1 REPLY 1
lbendlin
Super User
Super User

Please provide sample data (with sensitive information removed) 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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors