Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 37 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 25 |