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
Nibz
Helper I
Helper I

Sales on segment dates

In a specific table, I have a date, and I use it in a segment graphDate.PNG

 

Then I have an other table with the following information :

[BillSales] 3

[Bill.StartDate] 4

[Bill.EndDate] 5

 

And I try to write this formula in Power BI

 

[BillSales] 3 * (Difference in days between (

                               (IF [Bill.EndDate] 5 - 1 day > 2 ; 2 ; [Bill.EndDate] 5 - 1 day)

                               AND

                               (IF [Bill.StartDate] 4 > [SegmentFilter.StartDate] 1; [SegmentFilter.StartDate] 1; [Bill.StartDate] 4 )

                ) + 1 day

) / (Difference in days between [Bill.EndDate] 5 and [Bill.StartDate] 4 + 1 day)

 

Many thanks for your help

11 REPLIES 11

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.