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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Elofly
Frequent Visitor

Need DAX formula to get value by filter

Hi everyone,

 

I need to calculate a value instead of having it in a matrix:

Elofly_0-1706873373750.png

 

So this is the list of duplicate booking identificar and a count of how many bookings for each value.

But I have a filter applied to count ONLY when Bookings are superior to 1.

 

I need to calculate that value so i get the number 2584 in a card and so I can calculate some ratios.

I cannot find the formula to do it.

 

Thanks a lot in advance for your help

 

1 ACCEPTED SOLUTION
talespin
Solution Sage
Solution Sage

hi @Elofly ,

 

Created a sample table, below is the measure.

 

TotalCount =
SUMX(
        FILTER(
                ADDCOLUMNS(
                            SUMMARIZE(TestTbl3, TestTbl3[Booking]
                            ),
                            "CountBooking", CALCULATE(COUNT(TestTbl3[Booking]))
                ),
                [CountBooking] > 1        
        ),
        [CountBooking]
)
 

talespin_0-1706833977604.png

talespin_1-1706834015474.png

 

 

View solution in original post

2 REPLIES 2
talespin
Solution Sage
Solution Sage

hi @Elofly ,

 

Created a sample table, below is the measure.

 

TotalCount =
SUMX(
        FILTER(
                ADDCOLUMNS(
                            SUMMARIZE(TestTbl3, TestTbl3[Booking]
                            ),
                            "CountBooking", CALCULATE(COUNT(TestTbl3[Booking]))
                ),
                [CountBooking] > 1        
        ),
        [CountBooking]
)
 

talespin_0-1706833977604.png

talespin_1-1706834015474.png

 

 

Dangar332
Super User
Super User

hi, @Elofly 

try below  measure

measure =
countx(all('tablename'),'tablename'[bookingcolumn])

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.