The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All,
I need a Measure to calcualte the 3 Months total as shonw in follwoing screen print. please assit. Thanks
Ex : - Jan,Fab & Mar total shown be the 3 Months accross Jan,Feb & Mar (1598+1735+1659) = 4992 etc...
Solved! Go to Solution.
Hi @Suhel_Ansari ,
Please use this DAX to achieve your goal:
QuarterlyTotal =
VAR CurrentQuarter = QUARTER(MAX('Table'[Edate]))
VAR CurrentYear = YEAR(MAX('Table'[Edate]))
RETURN
CALCULATE(
SUM('Table'[Saless]),
FILTER(
ALL('Table'),
YEAR('Table'[Edate]) = CurrentYear &&
QUARTER('Table'[Edate]) = CurrentQuarter
)
)
Your final result will look like this:
Hi @Suhel_Ansari ,
Please use this DAX to achieve your goal:
QuarterlyTotal =
VAR CurrentQuarter = QUARTER(MAX('Table'[Edate]))
VAR CurrentYear = YEAR(MAX('Table'[Edate]))
RETURN
CALCULATE(
SUM('Table'[Saless]),
FILTER(
ALL('Table'),
YEAR('Table'[Edate]) = CurrentYear &&
QUARTER('Table'[Edate]) = CurrentQuarter
)
)
Your final result will look like this:
Hello @Suhel_Ansari ,
Could you try below the dax code:
"
Total 3-Months =
CALCULATE(
SUM('YourTable'[Sales]),
FILTER(
ALL('YourTable'[Date]),
YEAR('YourTable'[Date]) = YEAR(MAX('YourTable'[Date])) &&
QUARTER('YourTable'[Date]) = QUARTER(MAX('YourTable'[Date]))
)
)
"
Kind Regards,
Gökberk Uzuntaş
📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!
🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |
@Suhel_Ansari I recommend @uzuntasgokberk solution for your case if you have multiple years.
Otherwise try this DAX: (This only works for one year period as per your given data)
User | Count |
---|---|
77 | |
77 | |
36 | |
30 | |
28 |
User | Count |
---|---|
107 | |
100 | |
55 | |
49 | |
45 |