Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hi All,
Expected Output:
Workitem ID | State | Previous_State |
1001 | backlog | |
1001 | Inprogress | Backlog |
1001 | Done | Inprogress |
2001 | backlog | |
2001 | Inprogress | Backlog |
2001 | Done | Inprogress |
I am trying to create Previous_State column based on State .
Written the below DAX but its giving me Done, Backlog instead of backlog and Inprogress.
Workitem ID | State | Previous_State |
1001 | backlog | |
1001 | Inprogress | Done |
1001 | Done | Backlog |
2001 | backlog | |
2001 | Inprogress | Done |
2001 | Done | Backlog |
Please help,
Thanks,
Solved! Go to Solution.
Hi @Naveen112
There are multiple ways to produce you required output, and one of them is as follows:
Create index dimension table which also has previous row side by side.
Create a relationship between your index dimension table and your fact table.
Create a calculated column which produces your required output like below:
I attach an example pbix file.
Best regards,
Hi @Naveen112
There are multiple ways to produce you required output, and one of them is as follows:
Create index dimension table which also has previous row side by side.
Create a relationship between your index dimension table and your fact table.
Create a calculated column which produces your required output like below:
I attach an example pbix file.
Best regards,
Use visual level calculation in home tab > new calculation
and use previous in measure
Check this
Hi, Thanks for the reply but I dont think we can use previous on a dimension like previous(state) .
Please can some one help me with the exact result which i am expecting as this is an important work which has dependencies.
Create on index column in a table and create measure as shown in below image
HI @Surya9 , Can you please share me the logic for INDEX please. I can replicate and check thank you
Sure, Under transform data >click add column >index column from 1
@Naveen112 Do you have anything that defines "before"? Can you add an Index? If so you can get previous value using a variation of MTBF. See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/3395....
The basic pattern is:
Column =
VAR __Current = [Value]
VAR __PreviousDate = MAXX(FILTER('Table','Table'[Date] < EARLIER('Table'[Date])),[Date])
VAR __Previous = MAXX(FILTER('Table',[Date]=__PreviousDate),[Value])
RETURN
( __Current - __Previous ) * 1.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
89 | |
86 | |
75 | |
69 | |
68 |
User | Count |
---|---|
220 | |
128 | |
117 | |
82 | |
77 |