Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
SirBI
Frequent Visitor

Dynamic Sum of Column

Hello all. I have the below table (Daily Request) loaded into PBI: 

 

DateSumSuccess**SuccessFalseCount
12/22/22100True15
12/22/225False15
12/21/22200True15
12/21/2210False15

 

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:
DateSumSuccess**SuccessFalseCount
12/22/22100True5
12/22/225False5
12/21/22200True10
12/21/2210False10
 
1 ACCEPTED SOLUTION
sturlaws
Resident Rockstar
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] )

 

sturlaws_0-1671752908564.png

 

 Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

View solution in original post

1 REPLY 1
sturlaws
Resident Rockstar
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] )

 

sturlaws_0-1671752908564.png

 

 Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors