Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
HI PowerBI Experts ,
need the dax formula for the selected with previous month or year seelction for salesand Purchase for the selected year or month .
Here is the Screenshoot for more details. can any one help out from this .
Can anyone solve this using dax . this would be more helpful .
Thanks in Advance,
Thanks
Sandeep
Solved! Go to Solution.
Hi @avulasandeep ,
Update the measure.
Measure = CALCULATE(SUM(Table1[Sales]),FILTER(ALL(Table1),Table1[MonthNo]=MAX(Table1[MonthNo])+1))-CALCULATE(SUM(Table1[Purchase]))
Regards,
Frank
Hi @avulasandeep ,
Does that make sense? If so, kindly mark my answer as the solution to close the case please. Thanks in advance.
Regards,
Frank
Hi @avulasandeep ,
Update the measure.
Measure = CALCULATE(SUM(Table1[Sales]),FILTER(ALL(Table1),Table1[MonthNo]=MAX(Table1[MonthNo])+1))-CALCULATE(SUM(Table1[Purchase]))
Regards,
Frank
Hi @avulasandeep ,
Does that make sense? If so, kindly mark my answer as the solution to close the case please. Thanks in advance.
Regards,
Frank
Hi @avulasandeep ,
1. Create a calculated column as below.
MonthNo = SWITCH(Table1[Month],"January",1,"February",2,"March",3,"April",4,"May",5,"June",6,"July",7,"August",8,"September",9,"October",10,"November",11,"December",12)
2. Create a measure to get the result we need.
Measure = CALCULATE(SUM(Table1[Sales]))- CALCULATE(SUM(Table1[Purchase]),FILTER(ALL(Table1),Table1[MonthNo]=MAX(Table1[MonthNo])-1))
Regards,
Frank
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
105 | |
87 | |
74 | |
66 |
User | Count |
---|---|
124 | |
112 | |
96 | |
82 | |
72 |