Forum Discussion
Unexpected behavior in Power BI vs expected in Power Pivot - Context transition
- 7 years ago
Just disable Auto Date/Time.
(explanation would be long, but really - just don't use Auto Date/Time and create your own Date table).
- 7 years ago
Options and settings / Options / Data Load / Time intelligence / Auto Date/Time
You have that setting enabled and it creates a date table for each date column in the model.
Hi AlB
The date format is recognized as month/day/year in power bi by default.
Based on my test, the second formula is also incorrect.
i create a rank column
in table1
Column 2 =
RANKX (
FILTER (
ALL ( Table1 ),
[YearId] = EARLIER ( Table1[YearId] )
&& [SchoolId] = EARLIER ( Table1[SchoolId] )
),
Table1[Date],
,
ASC
)
while the rank column in your table3 is like:
Best Regards
Maggie
Thanks very much for your reply. A couple of things:
1. Why do you say the result in RankCol in Table3 is incorrect? I believe it is correct. Bear in mind that the Date column is of type text in this case so the RANKX is actually performing an alphabetical sorting and thus 01/10/2017 is ranked higher than 30/09/2017 in an ascending ranking. That's exactly what I expected, plus the context transition seems to work correctly. Disagree?
2. I appreciate the alternative you provide but I am especially interested in, and that is the question on my post, why RankCol in Table1 does not work. It should, based on the reasons I presented earlier, and it fact it does work in Power Pivot with exactly the same data. Why doesn't it in Power BI Desktop? The result should be the same as what you obtain in your 'Column 2'
Thanks a lot
- AlB7 years ago
Community Champion
Alrite. guess it's time to call the cavalry
Zubair_Muhammad, Greg_Deckler, MFelix any idea?
Many thanks
- Greg_Deckler7 years ago
Community Champion
This seems more like an issue for marcorusso, he loves these down and dirty DAX questions.
- marcorusso7 years ago
Most Valuable Professional
Just disable Auto Date/Time.
(explanation would be long, but really - just don't use Auto Date/Time and create your own Date table).