Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
Check it out now!Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hi All,
I have the requirement to show current year and Previous year value in Matrix based on slicer month year selection month will display in coulumn cust1,cust2 and others are current year calc same calc for previous year and show under this table cust1 PY,Cust2 PY and others PY,If add the measure cust1 PY etc its show jan 23 to mar 23 values on column but i want column should be jan feb mar and corresponding values for cust1 and cust1 PY
Thanks,
Sanjay.
Solved! Go to Solution.
Hi @sanjaymithran ,
Depend on your description, you can try formula like below:
Cust1 CY =
CALCULATE(
SUM(Sales[Amount]),
FILTER(Sales, Sales[Customer] = "Cust1")
)
Cust2 CY =
CALCULATE(
SUM(Sales[Amount]),
FILTER(Sales, Sales[Customer] = "Cust2")
)
Cust1 PY = CALCULATE([Cust1 CY],SAMEPERIODLASTYEAR('Date'[Date]))
Cust2 PY = CALCULATE([Cust2 CY],SAMEPERIODLASTYEAR('Date'[Date]))
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 @sanjaymithran ,
Depend on your description, you can try formula like below:
Cust1 CY =
CALCULATE(
SUM(Sales[Amount]),
FILTER(Sales, Sales[Customer] = "Cust1")
)
Cust2 CY =
CALCULATE(
SUM(Sales[Amount]),
FILTER(Sales, Sales[Customer] = "Cust2")
)
Cust1 PY = CALCULATE([Cust1 CY],SAMEPERIODLASTYEAR('Date'[Date]))
Cust2 PY = CALCULATE([Cust2 CY],SAMEPERIODLASTYEAR('Date'[Date]))
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.
Can you please provide a sample PBIX file or sample data file?