Forum Discussion
Infinifox
2 years agoFrequent Visitor
Help with counting rows based on conditions
Hi Everyone, I have a problem that I need help with. What I am trying to do is have 2 counts that can also be displayed within a table with these fields Work Order, Work Order Phase, Asset Tag, ...
- Anonymous2 years ago
Hi Infinifox ,
I create three tables as you mentioned.
Then I think you can create a measure and here is the DAX code.
Measure = VAR SystemAssets = FILTER ( Asset, Asset[assetType] = "System" ) VAR ChildAssets = CALCULATETABLE ( SUMMARIZE ( ChildAsset, ChildAsset[childAssetTag], ChildAsset[assetTag] ), SystemAssets ) RETURN COUNTROWS ( SystemAssets )Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
2 years agoNot applicable
Hi Infinifox ,
For some new community members, they don't have the permission to upload .pbix files. You may need to share file links via DropBox, One Drive, Drive or any other tool.
I also create a table as you mentioned.
Then I think you can use the DAX codes below.
Measure =
CALCULATE (
COUNTROWS ( 'Table' ),
'Table'[Asset Type] = "SERIALIZED",
'Table'[# of Serialized Assets (legislated)] = 1
)Measure 2 =
CALCULATE (
COUNTROWS ( 'Table' ),
'Table'[Asset Type] = "SYSTEM",
'Table'[# of Serialized Assets (legislated)] = 0,
'Table'[# of Child Assets (legislated)] <> 0
)
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.