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
I use this calculated column to calculate days between entries. I want to calculate days between when there are multiple slicers. It works with the ID slicers but not anything else. Any ideas?
With ID slicer works fine
Calculated columns are only updated when you refresh the dataset. You would need (and probably should anyway) covert this to a measure.
The reason I used a calculated column is because I would always get an error with the measure using the exact same DAX.
The concept of earlier doesnt exists if you take your calculated column logic and directly apply to a measure. You can use earlier in a measure with some additiona logic, but probably easier to just add an index to your table so you have a concept of what is previous. You can do that using a calculated column, or better yet power query. can you upload some sample data?
This is what my data looks like.
Sliced by ID without category slicer
Sliced by ID with category slicer. Does not count days properly.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 60 | |
| 43 | |
| 40 | |
| 37 | |
| 21 |
| User | Count |
|---|---|
| 178 | |
| 127 | |
| 116 | |
| 77 | |
| 54 |