Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
The bug can be reproduced in a blank Power BI Desktop file in the following way:
Date = ADDCOLUMNS ( CALENDAR ( DATE ( 2017, 1, 1 ), DATE ( 2018, 12, 31 ) ), "End of Month", EOMONTH ( [Date], 0 ) )
NoRows = GENERATE ( CALCULATETABLE ( VALUES ( 'Date'[End of Month] ), 'Date'[End of Month] = DATE ( 2018, 4, 30 ) ), VAR RunningMonths = CALCULATETABLE ( VALUES ( 'Date'[End of Month] ), DATESINPERIOD ( 'Date'[Date], 'Date'[End of Month], -12, MONTH ) ) RETURN SELECTCOLUMNS ( RunningMonths, "Previous Months", 'Date'[End of Month] ) )
TwelveRows = GENERATE ( CALCULATETABLE ( VALUES ( 'Date'[End of Month] ), 'Date'[End of Month] = DATE ( 2018, 4, 30 ) ), VAR RunningMonths = CALCULATETABLE ( VALUES ( 'Date'[End of Month] ), DATESINPERIOD ( 'Date'[Date], 'Date'[End of Month], -12, MONTH ) ) RETURN SELECTCOLUMNS ( RunningMonths, "Previous Months", 'Date'[End of Month] + 0 ) )The only difference is "+ 0" in SELECTCOLUMNS inside GENERATE. Now there are twelve rows.
TwelveRows2 = GENERATE ( CALCULATETABLE ( VALUES ( 'Date'[End of Month] ), 'Date'[End of Month] = DATE ( 2018, 4, 30 ) ), SELECTCOLUMNS ( CALCULATETABLE ( VALUES ( 'Date'[End of Month] ), DATESINPERIOD ( 'Date'[Date], 'Date'[End of Month], -12, MONTH ) ), "Previous Months", 'Date'[End of Month] ) )
Is there any explanation for this, or is this indeed a bug?
I am using Power BI Desktop 2.56.5023.1021 64-bit (March 2018)
Just in case, here is my file: https://1drv.ms/u/s!Arstm99Oom00gdxdpEIT0K7fWgz8fA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.