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
Nimai123
Post Patron
Post Patron

DAX-Calculating Relative sum problem

I have a measure which is working fine named as

 

Booked Early = 

var qr = SELECTEDVALUE(QTR[Qtr Name])
var wn = SELECTEDVALUE(Qtr[Week Num])
return
CALCULATE(Sum(bookings_reporting_view[line_item_acv_price_converted]),
bookings_reporting_view[cld_fq] = qr,
bookings_reporting_view[cld_weekhelp] = wn,
bookings_reporting_view[timing_quarter] = {"a - early"},
bookings_reporting_view[stage] in {"Booked","5 - Renewal Won"}
)
 
And I want to calculate the creative sum of the data.
The measure created by me works well for some dates not for all.
Running Booked Early = CALCULATE(SUM(bookings_reporting_view[line_item_acv_price_converted]),
FILTER (
ALLSELECTED(bookings_reporting_view),
bookings_reporting_view[cld_fq] <= MIN(Qtr[Qtr Name])
&& bookings_reporting_view[cld_weekhelp] <= MIN(Qtr[Week Num])
&& bookings_reporting_view[timing_quarter] = {"a - early"}
&& bookings_reporting_view[stage] in {"Booked","5 - Renewal Won"}
)
)
 
While it's working well when selected FY19-Q1 in the slicer - if there is data it adds up with the previous data and if no data it displays the same data as shown bellow
17 18 19 are the week numbers in that quarter 
Capture.PNG
 
While it's not working well when selected FY19-Q2- It's taking the wrong data at the first place
Capture1.PNG
 
 Need desired output for Running booked early
Capture2.PNG
 
 
 
1 ACCEPTED SOLUTION
v-lionel-msft
Community Support
Community Support

Hi @Nimai123 ,

 

x5.PNG

Please give example data for these two tables and point out the relationship between them.

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-lionel-msft
Community Support
Community Support

Hi @Nimai123 ,

 

x5.PNG

Please give example data for these two tables and point out the relationship between them.

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I got the solution thanks I didn't make a relationship between them, after making it worked!

 

Thanks

Booking _reporting_view[cld_fq] 

Capture.PNG

 

Qtr[Qtr Name]

Capture1.PNG

 

Taking Qtr[Qtr Name] in the slicer (additional information)

 

No relationship between them I tried to make but ending up in M-M.

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.