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'd like to create a running total where I can filter the rows used by using a date slicer on another column. I have one data table with two columns, 'time' and 'dat', that looks like this:
table_a
time | dat |
7 | 29/07/2019 13:33 |
15 | 02/01/2018 15:09 |
60 | 03/01/2018 15:53 |
25 | 30/07/2019 14:16 |
6 | 04/01/2018 15:11 |
8 | 31/07/2019 13:09 |
31 | 01/08/2019 13:25 |
14 | 02/08/2019 12:00 |
29 | 11/01/2018 11:00 |
20 | 05/08/2019 13:56 |
30 | 06/08/2019 13:59 |
20 | 07/08/2019 12:04 |
19 | 07/08/2019 12:05 |
137 | 08/08/2019 13:58 |
132 | 08/08/2019 14:00 |
20 | 09/08/2019 14:22 |
20 | 09/08/2019 14:24 |
13 | 22/01/2018 13:31 |
8 | 12/08/2019 15:43 |
7 | 12/08/2019 15:44 |
64 | 23/01/2018 11:50 |
To achieve a running total area chart I've created a new table, table_b:
Solved! Go to Solution.
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, Try these two measure that based on your column formula
Count maeasure = CALCULATE(COUNTROWS(table_a), FILTER(ALLSELECTED(table_a), table_a[time] <= MAX(table_b[Value])))
relative measure = [Count maeasure]/CALCULATE(MAXX(table_b,[Count maeasure]),ALLSELECTED(table_b))
Regards,
Lin
You will need to use a measure then, not a column. Columns can't be dynamic like that.
How would I do that using a measure? thanks in advance
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, Try these two measure that based on your column formula
Count maeasure = CALCULATE(COUNTROWS(table_a), FILTER(ALLSELECTED(table_a), table_a[time] <= MAX(table_b[Value])))
relative measure = [Count maeasure]/CALCULATE(MAXX(table_b,[Count maeasure]),ALLSELECTED(table_b))
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 |
---|---|
115 | |
99 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |