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
I want to calculate new customer Trend on date column based on slicer (Type).
When Slicer selection Type = "ALL", this customer should show as new on 1/1/2020
When Slicer selection Type = A, this customer should show as new on 1/1/2020
When Slicer selection Type = B, this customer should show as new on 1/2/2020
When Slicer selection Type = C, this customer should show as new on 2/1/2020
I tried using Earlier DAX function but Earlier is not helping with the slicer. Can we have a dynamic measure to get the new customers based on slicer selection option.
Solved! Go to Solution.
hi @Anonymous
First, you should know that:
1. Calculation column/table not support dynamic changed based on filter or slicer.
2. Measure can be affected by filter/slicer, so you can use it to get dynamic summary result.
https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
Second, for your case, you could try this measure
Measure =
IF(SELECTEDVALUE('Table'[Date])=CALCULATE(MIN('Table'[Date]),ALLSELECTED('Table')),"New")
or
Measure 2 =
IF(SELECTEDVALUE('Table'[Date])=CALCULATE(MIN('Table'[Date]),FILTER(ALLSELECTED('Table'),'Table'[ID]=MAX('Table'[ID]))), "New")
Result:
and here is sample pbix file, please try it.
Regards,
Lin
hi @Anonymous
First, you should know that:
1. Calculation column/table not support dynamic changed based on filter or slicer.
2. Measure can be affected by filter/slicer, so you can use it to get dynamic summary result.
https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
Second, for your case, you could try this measure
Measure =
IF(SELECTEDVALUE('Table'[Date])=CALCULATE(MIN('Table'[Date]),ALLSELECTED('Table')),"New")
or
Measure 2 =
IF(SELECTEDVALUE('Table'[Date])=CALCULATE(MIN('Table'[Date]),FILTER(ALLSELECTED('Table'),'Table'[ID]=MAX('Table'[ID]))), "New")
Result:
and here is sample pbix file, please try it.
Regards,
Lin
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 14 | |
| 7 | |
| 5 | |
| 5 |
| User | Count |
|---|---|
| 29 | |
| 18 | |
| 17 | |
| 11 | |
| 10 |