Forum Discussion
Transform PBI Formula to DAX Power Pivot
- 4 years ago
Hi, marsclone
As far as I know, since Power BI is based on Power Pivot, a formula can be used in Power BI, then it can be used in Power Pivot.
It should be noted that the lower level also belongs to the higher level. So if the judgment is not nested, then there may be multiple values.
You may need to modify your formula like below:
ScopeCurrentLevel = VAR level = IF( ISINSCOPE( Financial_Statement_Layouts[Level 4] ), IF( ISINSCOPE( Financial_Statement_Layouts[Level 3] ), IF( ISINSCOPE( Financial_Statement_Layouts[Level 2] ), IF( ISINSCOPE( Financial_Statement_Layouts[Level 1] ), 0, 1 ), 2 ), 3 ), 4 ) RETURN levelBest Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - 4 years ago
=if(isfiltered(Financial_Statement_Layouts[Level 1]),if(isfiltered(Financial_Statement_Layouts[Level 2]),if(isfiltered(Financial_Statement_Layouts[Level 3]),if(isfiltered(Financial_Statement_Layouts[Level 4]),4,3),2),1))
Hi, marsclone
As far as I know, since Power BI is based on Power Pivot, a formula can be used in Power BI, then it can be used in Power Pivot.
It should be noted that the lower level also belongs to the higher level. So if the judgment is not nested, then there may be multiple values.
You may need to modify your formula like below:
ScopeCurrentLevel =
VAR level =
IF(
ISINSCOPE( Financial_Statement_Layouts[Level 4] ),
IF(
ISINSCOPE( Financial_Statement_Layouts[Level 3] ),
IF(
ISINSCOPE( Financial_Statement_Layouts[Level 2] ),
IF( ISINSCOPE( Financial_Statement_Layouts[Level 1] ), 0, 1 ),
2
),
3
),
4
)
RETURN
level
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.