Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
GekonPL
New Member

Blank values in Year Month column on the web visualisation while all is visible in Power Bi desktop,

Hi All,

 

I've got report showing some sales numbers, it's ordered by the Year Month column. All works fine appart of small displaying issues.

On the Web version of that report the value for the latest two months are blank in Year Month column leaving others values as the should be but the same report deployed in Power Bi Desktop behave as it spous to. I have run out of ideas what can cause this issues so welcom any help.

 

Belowe report on the WEB

 

Report on the WEBReport on the WEB

And the very same one in the Desktop,

 

Report in DesktopReport in Desktop

 

 

 

1 ACCEPTED SOLUTION

Thank you for the quick answer,

I did go through your short example and had a second thought about my code. Initially in my Calendar definition the date range has been static:


Calendar Table = VAR BaseCalendar = CALENDAR(Date(2018,8,14), Date(2020,8,13))

 

In main visalistaion compare last year turnover to the current year (Day to Day). The one of requirement was to show comparing data until the current date, it was achived by using code below:

 

Return
GENERATE(

BaseCalendar,
VAR BaseDate = [Date]
VAR YearDate = YEAR(BaseDate)
VAR WeekNumber = IF(WEEKNUM(BaseDate) = 53, 52, WEEKNUM(BaseDate))
VAR MonthNumber = MONTH(BaseDate)
VAR YearMonthNumber = YearDate * 12 + MonthNumber - 1
VAR WeeKYearNumber = VALUE(YearDate& IF((WeekNumber<10),"0" & WeekNumber, WeekNumber))
VAR QTR = CONCATENATE("Q", ROUNDUP(MONTH([Date])/3,0))
Return ROW(
"Year", YearDate,
"Week Number", WeekNumber,
"Month Number", MonthNumber,
"Month", FORMAT(BaseDate, "mmmm"),
"Year Month Number", YearMonthNumber,
"Week Year Number", LEFT(WeeKYearNumber,4) & " " & RIGHT(WeeKYearNumber,2),
"Year Month", IF((YEAR(NOW())*12 + MONTH(NOW()) -1) >= (YEAR([Date])*12 + MONTH([Date]) -1), FORMAT(BaseDate, "mmm yy"), ""),
"QTR", QTR
)

 

It works great, however I found issues with not displaying the latest Year Month values (March, April, May).
So I did change the range in calendar to:

 

VAR BaseCalendar = CALENDAR( Date(2018,8,14), Today() )

 

and now so far it's works perfectly. All values in 'Year Month' column are now visible.

View solution in original post

4 REPLIES 4
Icey
Community Support
Community Support

Hi @GekonPL ,

 

I have created a sample file, but didn't meet the issue.

In Power BI DesktopIn Power BI DesktopIn Power BI ServiceIn Power BI Service

 

Please share me your PBIX file, removing sensitive information and replacing real data with dummy data, for specific test.

It is suggested to upload your file to OneDrive for Business and then paste the link here.

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you for the quick answer,

I did go through your short example and had a second thought about my code. Initially in my Calendar definition the date range has been static:


Calendar Table = VAR BaseCalendar = CALENDAR(Date(2018,8,14), Date(2020,8,13))

 

In main visalistaion compare last year turnover to the current year (Day to Day). The one of requirement was to show comparing data until the current date, it was achived by using code below:

 

Return
GENERATE(

BaseCalendar,
VAR BaseDate = [Date]
VAR YearDate = YEAR(BaseDate)
VAR WeekNumber = IF(WEEKNUM(BaseDate) = 53, 52, WEEKNUM(BaseDate))
VAR MonthNumber = MONTH(BaseDate)
VAR YearMonthNumber = YearDate * 12 + MonthNumber - 1
VAR WeeKYearNumber = VALUE(YearDate& IF((WeekNumber<10),"0" & WeekNumber, WeekNumber))
VAR QTR = CONCATENATE("Q", ROUNDUP(MONTH([Date])/3,0))
Return ROW(
"Year", YearDate,
"Week Number", WeekNumber,
"Month Number", MonthNumber,
"Month", FORMAT(BaseDate, "mmmm"),
"Year Month Number", YearMonthNumber,
"Week Year Number", LEFT(WeeKYearNumber,4) & " " & RIGHT(WeeKYearNumber,2),
"Year Month", IF((YEAR(NOW())*12 + MONTH(NOW()) -1) >= (YEAR([Date])*12 + MONTH([Date]) -1), FORMAT(BaseDate, "mmm yy"), ""),
"QTR", QTR
)

 

It works great, however I found issues with not displaying the latest Year Month values (March, April, May).
So I did change the range in calendar to:

 

VAR BaseCalendar = CALENDAR( Date(2018,8,14), Today() )

 

and now so far it's works perfectly. All values in 'Year Month' column are now visible.

Icey
Community Support
Community Support

Hi @GekonPL ,

 

Glad to hear the issue is gone. You may help accept the replies making sense as solution above. Your contribution is highly appreciated.

 

 

Best Regards,

Icey

az38
Community Champion
Community Champion

Hi @GekonPL 

it could be a regional settings issue

how does date for last monthes formatted in data source?


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors