Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
Help me in converting this Calculation to PowerBI
Note ; Fiscper and Current Fiscpervalue both are numeric values
1=IF ATTR(([Fiscper])=STR([Current Fiscpervalue])) THEN
[6 Inv Start] ELSE LOOKUP( RUNNING_SUM([6 Inv Start])+ RUNNING_SUM(SUM([8 Week Chang R])),-1) END
===============================================================
2= IF ATTR(([Fiscper])=STR([Current Fiscpervalue]))
THEN
LOOKUP(SUM([Act Inv]),-1)
END
==============================
Thanks in Advance
Solved! Go to Solution.
Hi @Anonymous ,
Please try below dax formula:
1 =
IF (
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER ( 'Table', 'Table'[Fiscper] = [Current Fiscpervalue] )
) = 1,
[6 Inv Start],
LOOKUPVALUE (
[6 Inv Start],
'Table'[Fiscper], EARLIER ( 'Table'[Fiscper] ),
'Table'[Week], EARLIER ( 'Table'[Week] )
)
)
2 =
IF (
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER ( 'Table', 'Table'[Fiscper] = [Current Fiscpervalue] )
) = 1,
LOOKUPVALUE (
[Act Inv],
'Table'[Fiscper], EARLIER ( 'Table'[Fiscper] ),
'Table'[Week], EARLIER ( 'Table'[Week] )
)
)
Please note that the formula is based on the assumption that the table name is 'Table'. You may need to replace it with the actual name of your table.
Also, please note that the formula is based on the assumption that the column names are the same as in the Tableau formula. You may need to replace them with the actual column names in your Power BI model.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Please try below dax formula:
1 =
IF (
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER ( 'Table', 'Table'[Fiscper] = [Current Fiscpervalue] )
) = 1,
[6 Inv Start],
LOOKUPVALUE (
[6 Inv Start],
'Table'[Fiscper], EARLIER ( 'Table'[Fiscper] ),
'Table'[Week], EARLIER ( 'Table'[Week] )
)
)
2 =
IF (
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER ( 'Table', 'Table'[Fiscper] = [Current Fiscpervalue] )
) = 1,
LOOKUPVALUE (
[Act Inv],
'Table'[Fiscper], EARLIER ( 'Table'[Fiscper] ),
'Table'[Week], EARLIER ( 'Table'[Week] )
)
)
Please note that the formula is based on the assumption that the table name is 'Table'. You may need to replace it with the actual name of your table.
Also, please note that the formula is based on the assumption that the column names are the same as in the Tableau formula. You may need to replace them with the actual column names in your Power BI model.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Below is the error
Please help me on this.
Thanks in advance !
Forget about Tableau. Formulate your business requirement and implement it in Power BI.
Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 40 | |
| 38 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 70 | |
| 69 | |
| 34 | |
| 33 | |
| 30 |