The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
This is card visual vaule for ESNcount(using above measure) which is showing right as per data.
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?
Solved! Go to Solution.
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.
Thank you. This solution works.
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.