Forum Discussion
AMorulita
2 years agoNew Member
Convert Tableau calculations into PowerBi dax
Hi friends! Please help! I'm new to PowerBI and I need to convert a couple of calculation from Tableau into PowerBI: I need to calculate the total number of fields that were marked with an error f...
- 2 years ago
AMorulita First, I would use the Fill down feature in Power Query to fill out your User column. Then you can do things like this:
Measure 1 = VAR __Table = SUMMARIZE( FILTER( 'Table', [ErrorType] <> "No Error" && [User] = "User 1" ), [ItemID], [Field] ) VAR __Result = COUNTROWS( __Table ) RETURN __Result Measure 2 = COUNTROWS( FILTER( 'Table', [User] = "User 1" ) ) Measure 3a = VAR __Table = SUMMARIZE( FILTER( 'Table', [ErrorType] <> "No Error" ), [ItemID], [Field] ) VAR __Result = COUNTROWS( __Table ) RETURN __Result Measure 3a = COUNTROWS( 'Table' )For the last one you can use a TopN filter or TOPN DAX function or perhaps RANKX
Greg_Deckler
Community Champion
2 years agoAMorulita First, I would use the Fill down feature in Power Query to fill out your User column. Then you can do things like this:
Measure 1 =
VAR __Table = SUMMARIZE( FILTER( 'Table', [ErrorType] <> "No Error" && [User] = "User 1" ), [ItemID], [Field] )
VAR __Result = COUNTROWS( __Table )
RETURN
__Result
Measure 2 = COUNTROWS( FILTER( 'Table', [User] = "User 1" ) )
Measure 3a =
VAR __Table = SUMMARIZE( FILTER( 'Table', [ErrorType] <> "No Error" ), [ItemID], [Field] )
VAR __Result = COUNTROWS( __Table )
RETURN
__Result
Measure 3a = COUNTROWS( 'Table' )
For the last one you can use a TopN filter or TOPN DAX function or perhaps RANKX