Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
97 | |
78 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |