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
Anonymous
Not applicable

graph considering all weeks

Hello,

I would like ask you about how I can get values when the date is not in my table, for example:

 

If I have a table with the follow info:

 

Date                  Score        Week

1/01/2018             1                 1

8/01/2018             1                 2

22/01/2018           1                 4

 

If I do a graph, it is going to be stratight line when I want a drop in week 3, but as I dont have date it is just a line.

How can I fix this having a Zero in week 3?

Thanks

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous

 

One way is to create a new calculated table for chart purpose

 

From the Modelling Tab >>>New Table

 

TableforChart =
GENERATESERIES ( MIN ( TableName[Week] ), MAX ( TableName[Week] ) )

 

This will give you a single column table of week numbers including weeks that are missing in your table. Rename the Column to "week"

 

Then create a relationship between yourtable and New Table.

Then add a calculated column to it

 

Score =
IF ( ISBLANK ( RELATED ( TableName[Score] ) ), 0, RELATED ( TableName[Score] ) )

Now create a chart using this New Table

 


Regards
Zubair

Please try my custom visuals

View solution in original post

3 REPLIES 3
v-jiascu-msft
Employee
Employee

Hi @Anonymous,

 

Could you please mark the proper answer as solution?

 

Best Regards!
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous

 

One way is to create a new calculated table for chart purpose

 

From the Modelling Tab >>>New Table

 

TableforChart =
GENERATESERIES ( MIN ( TableName[Week] ), MAX ( TableName[Week] ) )

 

This will give you a single column table of week numbers including weeks that are missing in your table. Rename the Column to "week"

 

Then create a relationship between yourtable and New Table.

Then add a calculated column to it

 

Score =
IF ( ISBLANK ( RELATED ( TableName[Score] ) ), 0, RELATED ( TableName[Score] ) )

Now create a chart using this New Table

 


Regards
Zubair

Please try my custom visuals

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.