Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Month | Product | SalesAmount |
Jan | A | 0 |
Jan | B | 84 |
Jan | C | 0 |
Feb | A | 68 |
Feb | B | 0 |
Feb | C | 0 |
Mar | A | 92 |
Mar | B | 0 |
Mar | C | 0 |
Apr | A | 61 |
Apr | B | 76 |
Apr | C | 0 |
How could it be done?
Solved! Go to Solution.
Hi @FreemanZ ,
Min sales:
easure =
var minsales = CALCULATE(MIN('Table'[SalesAmount]),FILTER(ALLEXCEPT('Table','Table'[Product]),'Table'[MonthNo]>MAXX(ALLSELECTED('Table'),'Table'[MonthNo])-3))
return
IF(minsales>0,0,1)
Sum sales:
Measure =
var sumsales = CALCULATE(SUM('Table'[SalesAmount]),FILTER(ALLEXCEPT('Table','Table'[Product]),'Table'[MonthNo]>MAXX(ALLSELECTED('Table'),'Table'[MonthNo])-3))
return
IF(minsales>0,0,1)
Best Regards,
Jay
Hi @FreemanZ ,
Min sales:
easure =
var minsales = CALCULATE(MIN('Table'[SalesAmount]),FILTER(ALLEXCEPT('Table','Table'[Product]),'Table'[MonthNo]>MAXX(ALLSELECTED('Table'),'Table'[MonthNo])-3))
return
IF(minsales>0,0,1)
Sum sales:
Measure =
var sumsales = CALCULATE(SUM('Table'[SalesAmount]),FILTER(ALLEXCEPT('Table','Table'[Product]),'Table'[MonthNo]>MAXX(ALLSELECTED('Table'),'Table'[MonthNo])-3))
return
IF(minsales>0,0,1)
Best Regards,
Jay
This code works:
Hi,
Please check the below picture and the attached pbix file.
All measures are in the attached pbix file.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |