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.
a
Solved! Go to Solution.
Hi @JUANKEEP ,
You can try dax formula like below:
MonthlySales =
VAR MaxYear = MAX('Sales'[Year])
VAR MinYear = MIN('Sales'[Year])
RETURN
ADDCOLUMNS(
CALENDAR(DATE(MinYear, 1, 1), DATE(MaxYear, 12, 31)),
"Year", YEAR([Date]),
"Month", MONTH([Date]),
"MonthlySales",
CALCULATE(
MAX('Sales'[CumulativeSales]),
FILTER(
'Sales',
'Sales'[Year] = YEAR([Date])
)
) - CALCULATE(
MAX('Sales'[CumulativeSales]),
FILTER(
'Sales',
'Sales'[Year] = YEAR([Date]) - 1
)
)
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @JUANKEEP ,
You can try dax formula like below:
MonthlySales =
VAR MaxYear = MAX('Sales'[Year])
VAR MinYear = MIN('Sales'[Year])
RETURN
ADDCOLUMNS(
CALENDAR(DATE(MinYear, 1, 1), DATE(MaxYear, 12, 31)),
"Year", YEAR([Date]),
"Month", MONTH([Date]),
"MonthlySales",
CALCULATE(
MAX('Sales'[CumulativeSales]),
FILTER(
'Sales',
'Sales'[Year] = YEAR([Date])
)
) - CALCULATE(
MAX('Sales'[CumulativeSales]),
FILTER(
'Sales',
'Sales'[Year] = YEAR([Date]) - 1
)
)
)
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to 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.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
User | Count |
---|---|
27 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
7 | |
6 |