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
I have a measure that looks at the Value of the current month and compares it to the previous month and applies a switch function if higher than the previous month. I would like to be able to sum the values from this switch function.
| Indicator | Oct 2021 | Nov 2021 | Dec 2021 |
| A | 1 | 0 | 1 |
| B | 1 | 0 | 1 |
| C | 0 | 0 | 1 |
| TOTAL | 1 | 0 | 1 |
Desired Results: (Notice Total is summed)
| Indicator | Oct 2021 | Nov 2021 | Dec 2021 |
| A | 1 | 0 | 1 |
| B | 1 | 0 | 1 |
| C | 0 | 0 | 1 |
| TOTAL | 2 | 0 | 3 |
Solved! Go to Solution.
@dcrow5378 can you try this
Measure 2 = SUMX(addcolumns(summarize(qm,QM[FacilityID],QM[Indicator],QM[Report Month]),"mx",[Measure]),[mx])
@dcrow5378 can you try this
Measure 2 = SUMX(addcolumns(summarize(qm,QM[FacilityID],QM[Indicator],QM[Report Month]),"mx",[Measure]),[mx])
@smpa01 That seemed to do the trick! I would not have got that one. Appreciate the quick help here!
@dcrow5378 does this give you what you need
Measure =
SUMX (
'QM',
VAR PriorMonthAmt =
CALCULATE ( [Max FAP], PARALLELPERIOD ( 'QM'[Report Month], -1, MONTH ) )
VAR Compare =
IF ( ISBLANK ( PriorMonthAmt ), BLANK (), PriorMonthAmt - [Max FAP] )
RETURN
SWITCH ( TRUE (), Compare = 0, 0, Compare < 0, 1, Compare > 0, 0 )
)
I am gueesing QM is the table where you have the column Indicator
@smpa01 Yes, QM is the table where I have the column indicator.
I did try something like this, and I just tried yours, and for some reason this is giving me all zeros, even though the values have increased from previous months?
@dcrow5378 sorry 'bout that. Is it kindly possible to reproduce a pbix in a small scale with identical measures for me/anyoneelse to debug?
Here is a link to the .pbix
https://drive.google.com/file/d/1xpaAOVl7xWQclEXDcMcWZl8OUpCqW9X7/view?usp=sharing
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 | |
| 7 | |
| 6 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 9 | |
| 8 | |
| 8 | |
| 8 |