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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
BN_04
Frequent Visitor

Measures are not working properly in live-dataset.

Hi,
I am using live-dataset.
I want to show count of a column as per the shift with non-blank value. For that I am using below measure-
ESNcount= CALCULATE(DISTINCTCOUNT([v]), FILTER('live-table', 'live-table'[tagID] = "ESN" && 'live-table'[v] <> BLANK() && 'live-table'[shiftkey] =[Shift] && 'live-table'[v] <> "" ))

Whenever I am using this measure in card visual values are populating correctly but for bar chart vlaues are changing completely.
Also filtering other columns are not working.

 

BN_04_0-1693811275564.png

This is card visual vaule for ESNcount(using above measure) which is showing right as per data.

 

BN_04_1-1693811334685.png

For this bar chart I am using same measure with stationID column but data is showing worng.

Does powerbi create any internal modelling/relations with measures respect to column? Because for both visuals I am using same DAX formula. Just for bar chart it is DAX with column.

Kindly help me out?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @BN_04 ,

 

I suggest you to try code as below.

ESNcount =
CALCULATE (
    DISTINCTCOUNT ( [v] ),
    FILTER (
        ALLEXCEPT ( 'live-table', 'live-table'[StationID] ),
        'live-table'[tagID] = "ESN"
            && 'live-table'[v] <> BLANK ()
            && 'live-table'[shiftkey] = [Shift]
            && 'live-table'[v] <> ""
    )
)

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
BN_04
Frequent Visitor

Thank you. This solution works.

Anonymous
Not applicable

Hi @BN_04 ,

 

I suggest you to try code as below.

ESNcount =
CALCULATE (
    DISTINCTCOUNT ( [v] ),
    FILTER (
        ALLEXCEPT ( 'live-table', 'live-table'[StationID] ),
        'live-table'[tagID] = "ESN"
            && 'live-table'[v] <> BLANK ()
            && 'live-table'[shiftkey] = [Shift]
            && 'live-table'[v] <> ""
    )
)

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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