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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
JustinDoh1
Post Prodigy
Post Prodigy

How to Label data with certain value

Hi 

I am sharing my Pbix file here and also attached.

I am trying to label (Blank) on this bar chart with something like "Prior to 2021".

JustinDoh1_0-1646267159309.png

I have a dim table (Calendar) that starts from 1/1/2021.

JustinDoh1_2-1646267714839.png

But, the fact table (Data)'s TransactionDate value starts from Jan 2020, and that caused the Blank value issue.

JustinDoh1_3-1646267988942.png

 

Is there way to lable on a new column using something like

("Prior 2021") = where TransactionDate < "01/01/2021"

 

Expected output:

JustinDoh1_4-1646268256841.png

 

Thanks.

 

 

1 ACCEPTED SOLUTION
sevenhills
Super User
Super User

My 2 cents:

In my view, You are seeing blank value in the chart because Data table has more dimension date data than in the Calendar table.  Calendar table needs to be fixed by having all dates that are in fact table. (Note: you are doing is cumulative sum, hence you must have all dates in my view.)

 

Once you have all the dates in the Calendar table, you can add a new column (or) adjust your "Year-MonthName" column per your needs 
i.e., "Prior 2021" for 2020 and below dates;  and for 2021 and above as "YYYY MMM"

 

 

View solution in original post

1 REPLY 1
sevenhills
Super User
Super User

My 2 cents:

In my view, You are seeing blank value in the chart because Data table has more dimension date data than in the Calendar table.  Calendar table needs to be fixed by having all dates that are in fact table. (Note: you are doing is cumulative sum, hence you must have all dates in my view.)

 

Once you have all the dates in the Calendar table, you can add a new column (or) adjust your "Year-MonthName" column per your needs 
i.e., "Prior 2021" for 2020 and below dates;  and for 2021 and above as "YYYY MMM"

 

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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