Forum Discussion
anshgupta
3 years agoFrequent Visitor
Add rows based on a column's first value
Hi, I have a table in the form: Week Total 44 123 45 245 46 456 I want to add 3 rows in the table containing the last three weeks before week 44 shown in the first row abo...
- Anonymous3 years ago
Hi anshgupta ,
Please try below steps:
1. below is my test table
Table:
2. create a new table with below dax formula
Table 2 = VAR min_val = MINX ( ALL ( 'Table' ), [Week] ) VAR _a = min_val - 1 VAR _b = min_val - 2 VAR _c = min_val - 3 RETURN { ( _a, "" ), ( _b, "" ), ( _c, "" ) }3. create a new table with below dax formual
Table 3 = UNION('Table','Table 2')Please refer the attached .pbix file.
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.
mangaus1111
Solution Sage
3 years agoHi anshgupta ,
see my pbi file. I have done it power query
https://1drv.ms/u/s!Aj45jbu0mDVJi1EPUFGFoDQKktRZ?e=Ko2Pu3
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
anshgupta
3 years agoFrequent Visitor
Hi,
I am not able to access the link