Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon'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.
Hi Team, Need some help to convert tableau expression to power bi "ATTR([TSR Created Date _ Today N])", i tried with selectedvalue function but it's not working so can anyone help me how to convert from Tableau to Power bi.
Solved! Go to Solution.
@sreddy47652 These usually go better if you provide sample data and expected result but in this case, I believe the equivalent DAX is:
Measure =
VAR __Table = SUMMARIZE( 'Table', [TSR Created Date _ Today N] )
VAR __Result = IF( COUNTROWS( __Table ) > 1, "*", MAXX( __Table, [TSR Created Date _ Today N] ) )
RETURN
__Result
Hi @sreddy47652 ,
See the below data:
When I use attr:
Final I get:
Import data to Power BI:
You can try this DAX code:
ATTR =
VAR MAXVALUE =
CALCULATE (
MAX ( 'Table'[State] ),
FILTER ( ALL ( 'Table' ), 'Table'[City] = MAX ( 'Table'[City] ) )
)
VAR MINVALUE =
CALCULATE (
MIN ( 'Table'[State] ),
FILTER ( ALL ( 'Table' ), 'Table'[City] = MAX ( 'Table'[City] ) )
)
RETURN
IF ( MAXVALUE = MINVALUE, MAX ( 'Table'[State] ), "*" )
Finally you will get what you want.
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.
@sreddy47652 These usually go better if you provide sample data and expected result but in this case, I believe the equivalent DAX is:
Measure =
VAR __Table = SUMMARIZE( 'Table', [TSR Created Date _ Today N] )
VAR __Result = IF( COUNTROWS( __Table ) > 1, "*", MAXX( __Table, [TSR Created Date _ Today N] ) )
RETURN
__Result
User | Count |
---|---|
117 | |
74 | |
62 | |
50 | |
45 |
User | Count |
---|---|
174 | |
125 | |
60 | |
60 | |
57 |