Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi All,
Please help..!
Need help with calculating "last3WeeksTotal" based on the selected Weekending date in the slicer. The formula I provided is showing blank results:
I have applied below DAX but it showing blank result :-
Report link below:
https://www.dropbox.com/s/6jvwyryae34ormg/3Weeks%20Total%20issue.pbix?dl=0
Any suggestions or corrections are welcome!
Solved! Go to Solution.
pls try this
3Wkstotal =
VAR _dateselected = [Selected_date]
VAR _Results =//Monday = 2,Tuesday = 3, Wednesday = 3, Thursday = 4, Friday = 5, Saturday = 6, Sunday = 7
CALCULATE(
SUM('Date_set'[Revenue]),
('Date_set'[Order Stage] ,
'Date_set'[Scope]) in {( "Ordered","Order")}, REMOVEFILTERS(CalendarDate), DATESBETWEEN('CalendarDate'[Date], _dateselected-27,_dateselected-7))
RETURN
_Results
-----------------or --------------
3Wkstotal =
VAR _dateselected = [Selected_date]
VAR _Results =//Monday = 2,Tuesday = 3, Wednesday = 3, Thursday = 4, Friday = 5, Saturday = 6, Sunday = 7
CALCULATE(
SUM('Date_set'[Revenue]),
('Date_set'[Order Stage] ,
'Date_set'[Scope]) in {( "Ordered","Order")}, DATESBETWEEN('CalendarDate'[Date], _dateselected-27,_dateselected-7))
RETURN
_Results
pls try this
3Wkstotal =
VAR _dateselected = [Selected_date]
VAR _Results =//Monday = 2,Tuesday = 3, Wednesday = 3, Thursday = 4, Friday = 5, Saturday = 6, Sunday = 7
CALCULATE(
SUM('Date_set'[Revenue]),
('Date_set'[Order Stage] ,
'Date_set'[Scope]) in {( "Ordered","Order")}, REMOVEFILTERS(CalendarDate), DATESBETWEEN('CalendarDate'[Date], _dateselected-27,_dateselected-7))
RETURN
_Results
-----------------or --------------
3Wkstotal =
VAR _dateselected = [Selected_date]
VAR _Results =//Monday = 2,Tuesday = 3, Wednesday = 3, Thursday = 4, Friday = 5, Saturday = 6, Sunday = 7
CALCULATE(
SUM('Date_set'[Revenue]),
('Date_set'[Order Stage] ,
'Date_set'[Scope]) in {( "Ordered","Order")}, DATESBETWEEN('CalendarDate'[Date], _dateselected-27,_dateselected-7))
RETURN
_Results
@Ahmedx Thank you so much, I am about to accept this as solution however i have just a little query, we are summing revenue currentrly right, but if I want to apply average function. it shows wrong result.
How we can achive 4552 when we use Average funtion instead of sum. Please suggest.
it's complicated, but try writing another measure like this
fexed =
var _tbl =
SUMMARIZE('Date_set','Date_set'[Business Unit])
RETURN
SUMX(_tbl,[3WksAvgNew])
Thi @Ahmedx Thank you for replying!
But it is showing blank after applying this measure.! as It seems too comlicated. Thanks for trying!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
98 | |
69 | |
46 | |
39 | |
33 |
User | Count |
---|---|
157 | |
101 | |
60 | |
43 | |
40 |