Forum Discussion
SirBI
3 years agoFrequent Visitor
Dynamic Sum of Column
Hello all. I have the below table (Daily Request) loaded into PBI:
| Date | Sum | Success | **SuccessFalseCount |
| 12/22/22 | 100 | True | 15 |
| 12/22/22 | 5 | False | 15 |
| 12/21/22 | 200 | True | 15 |
| 12/21/22 | 10 | False | 15 |
I created a measure (see above that give me a total count)
FailedRequest =
CALCULATE (
SUM( 'Daily Requests'[totalCount] ),
FILTER (
ALL('Daily Requests'),
'Daily Requests'[mmddyy]
&& 'Daily Requests'[success] = "False"))
I want the count to reflect for each day.
How can I create a dynamic count per day?
For example:
| Date | Sum | Success | **SuccessFalseCount |
| 12/22/22 | 100 | True | 5 |
| 12/22/22 | 5 | False | 5 |
| 12/21/22 | 200 | True | 10 |
| 12/21/22 | 10 | False | 10 |
Hi, SirBI,
Total count of false pr day = VAR _date = SELECTEDVALUE ( DailyRequest[Date] ) VAR _tmp = CALCULATETABLE ( FILTER ( ALL ( DailyRequest ), DailyRequest[Date] = _date && DailyRequest[Success] = FALSE () ) ) RETURN SUMX ( _tmp, DailyRequest[Total count column] )Cheers,
Sturla
If this post helps, then please consider Accepting it as the solution. Kudos are nice too.
1 Reply
- sturlaws
Resident Rockstar
Hi, SirBI,
Total count of false pr day = VAR _date = SELECTEDVALUE ( DailyRequest[Date] ) VAR _tmp = CALCULATETABLE ( FILTER ( ALL ( DailyRequest ), DailyRequest[Date] = _date && DailyRequest[Success] = FALSE () ) ) RETURN SUMX ( _tmp, DailyRequest[Total count column] )Cheers,
Sturla
If this post helps, then please consider Accepting it as the solution. Kudos are nice too.