Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
I just wanted to understand the behavior of calculate.
1)
The below is the dax
Can anyone help me understand how these values are produced?
--------------------------------------------
Also I wanted to know how do we compute new subscribers for previous month by tweaking this calculate.
Solved! Go to Solution.
Hi,
answers are here
I just wanted to understand the behavior of calculate.
1)
The below is the dax
Can anyone help me understand how these values are produced?
Answer: the problem is that even though the user made no selection (so [month selection] you would think returns 0, the month is in the context of the matrix, so [month selection] returns the visible month and a simple sum is like the CALCULATE statement you wrote), if you want to see nothing if the user selects more than one month change the code of the CALCULATE measure as follows (ALLSELECTED will ignore the month from the visual and only take it from the slicer)
--------------------------------------------
Also I wanted to know how do we compute new subscribers for previous month by tweaking this calculate.
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your threadconsider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
Hi,
answers are here
I just wanted to understand the behavior of calculate.
1)
The below is the dax
Can anyone help me understand how these values are produced?
Answer: the problem is that even though the user made no selection (so [month selection] you would think returns 0, the month is in the context of the matrix, so [month selection] returns the visible month and a simple sum is like the CALCULATE statement you wrote), if you want to see nothing if the user selects more than one month change the code of the CALCULATE measure as follows (ALLSELECTED will ignore the month from the visual and only take it from the slicer)
--------------------------------------------
Also I wanted to know how do we compute new subscribers for previous month by tweaking this calculate.
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your threadconsider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
@maverickf17 Good luck trying to understand the black box inner workings of CALCULATE. However, what is happening is that even though no months are selected in your slicer, the month is still being filtered in the table visual so month_selection is returning the selected month in the context of the table visual itself and hence your result. But, as you can see from your results, the CALCULATE function is wholly unnecessary and you don't need it at all. This is almost always the case, you really never have to use CALCULATE.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |