Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have a data set in which I need to tag resources used in a session, starting from 1. I am attaching an image for a sample of my data set. Please help me...
Solved! Go to Solution.
Check if RANKX Function works.
Rank = RANKX ( FILTER ( Table1, Table1[Session ID] = EARLIER ( Table1[Session ID] ) ), Table1[Start Time], , ASC, SKIP )
You may use the following DAX to add a calculated column.
Flag = IF ( MAXX ( TOPN ( 1, FILTER ( Table1, Table1[Session ID] = EARLIER ( Table1[Session ID] ) ), Table1[Start Time], ASC ), Table1[Resource] ) = 1, 1, 0 )
There is one slight error, that my session id's are in alpha numeric and so the format its format is text. And when I am using your suggested formula the following error is shown:
DAX comparison operations do not support comparing values of type Text with values of type Integer. Consider using the VALUE or FORMAT function to convert one of the values.
I tried formatting it using format and value function but to no avail.
Simply change it to VALUE ( Table1[Resource] ) or = "1".
Sorry, but I did not understand. Could you explain it again.
And my session id's are in the alpha numeric format, not my resources ids.
The data type of session id doesn't matter in formula above. Share the .pbix file if convenient.
Can you rewrite the formula, because did run successfully but it's resulting in only 0? I am attaching an image.
It works for your original sample data. You may need to check the actual data and change it accordingly. Better to learn more DAX basics before going ahead.
The formula didn't work on my sample data set also.
Please show us expected result based on your sample data.
Some thing like this:
Aren't there any commands like "Tag" found in stata for power bi.
Check if RANKX Function works.
Rank = RANKX ( FILTER ( Table1, Table1[Session ID] = EARLIER ( Table1[Session ID] ) ), Table1[Start Time], , ASC, SKIP )
And my session id's are in the alpha numeric format, not my resources ids.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
109 | |
100 | |
95 | |
38 | |
37 |
User | Count |
---|---|
151 | |
126 | |
75 | |
74 | |
57 |