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 have a simple query like :
SELECT COUNT(DISTINCT(p.id_organization)) AS CountFROM dbo.paiement pWHERE p.statut = 'AUTHORIZED' AND p.[date] > '2018-01-30'
I try to show this data on a PBI dashboard where I have a date range selector. I want the date to be fill with the begin and end date in two different areas so the calculation refresh on the fly. How can I link the AND p.[date] > 'XXXX-XX-XX' to this selector ?
Solved! Go to Solution.
hi, @Anonymous
The formula you had done is a measure,
and you could just drag Dates'[Date] field into a slicer and set its type is "between"
https://docs.microsoft.com/en-us/power-bi/desktop-measures
https://docs.microsoft.com/en-us/power-bi/desktop-calculated-columns
https://docs.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-slicers
Note: Be sure that BDD - Paiement table has created a relationship with date table.
Best Regards,
Lin
I just find out that I can do something like
Associations Actives =
CALCULATE(
DISTINCTCOUNT('BDD - Paiement'[id_organization]),
FILTER(
ALLSELECTED('Dates'[Date]),
ISONORAFTER('Dates'[Date], MAX('Dates'[Date]), DESC)
)
) But I want to have a `BETWEEN BeginDate AND EndDate` corresponding the time slider
PS : How do you call this kind of query bellow ?
hi, @Anonymous
The formula you had done is a measure,
and you could just drag Dates'[Date] field into a slicer and set its type is "between"
https://docs.microsoft.com/en-us/power-bi/desktop-measures
https://docs.microsoft.com/en-us/power-bi/desktop-calculated-columns
https://docs.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-slicers
Note: Be sure that BDD - Paiement table has created a relationship with date table.
Best Regards,
Lin
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 66 | |
| 47 | |
| 41 | |
| 36 | |
| 23 |
| User | Count |
|---|---|
| 189 | |
| 124 | |
| 106 | |
| 78 | |
| 52 |