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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

graph blank

hiii https://drive.google.com/file/d/1FIzvhscw2ZwGR3QbFz_d31PfJOlo-rYC/view?usp=sharing

i have a line graph which needs to display

past 2 months and current month data based on slicer selection i have all the calculations also working properly

but my line graph is not showing any visual

greeshma_0-1603117647958.png

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Anonymous ,

 

Please check:

 

1. Create another Dates table.

 

 

 

Dates =
ADDCOLUMNS (
    CALENDAR ( DATE ( 2020, 1, 1 ), DATE ( 2020, 12, 31 ) ),
    "Year", YEAR ( [Date] ),
    "Month", MONTH ( [Date] ),
    "MonthName", FORMAT ( [Date], "mmmm" )
)

 

 

 

 

2. Create columns in your Query table.

 

 

 

Call Closed Date = [Call Closed].[Date]

 

 

 

date.JPG

 

 

 

 

YearMonth = FORMAT([Call Closed Date],"YYYY MMMM")

 

 

 

 

 

3. Create relationship between the two tables.

relationship.jpg

 

4. Create measures.

 

 

 

M.SLA% 2 = CALCULATE([M.SLA%],DATESINPERIOD ( Dates[Date], MAX ( Dates[Date]), -3 , MONTH ))
RAW SLA% 2 = CALCULATE([RAW SLA%],DATESINPERIOD ( Dates[Date], MAX ( Dates[Date]), -3 , MONTH ))
Count of Call Closed = CALCULATE(COUNT(Query1[Call Closed]),DATESINPERIOD ( Dates[Date], MAX ( Dates[Date]), -3 , MONTH ))

 

 

 

 

5. Create visuals.

visuals2.JPGvisuals1.JPG

 

In addition, please change the slicer field to "MonthName" of "Dates" table.

slicer.JPG

 

 

Best regards

Icey

 

If this post helps,then consider Accepting it as the solution to help other members find it faster.

View solution in original post

2 REPLIES 2
Icey
Community Support
Community Support

Hi @Anonymous ,

 

Please check:

 

1. Create another Dates table.

 

 

 

Dates =
ADDCOLUMNS (
    CALENDAR ( DATE ( 2020, 1, 1 ), DATE ( 2020, 12, 31 ) ),
    "Year", YEAR ( [Date] ),
    "Month", MONTH ( [Date] ),
    "MonthName", FORMAT ( [Date], "mmmm" )
)

 

 

 

 

2. Create columns in your Query table.

 

 

 

Call Closed Date = [Call Closed].[Date]

 

 

 

date.JPG

 

 

 

 

YearMonth = FORMAT([Call Closed Date],"YYYY MMMM")

 

 

 

 

 

3. Create relationship between the two tables.

relationship.jpg

 

4. Create measures.

 

 

 

M.SLA% 2 = CALCULATE([M.SLA%],DATESINPERIOD ( Dates[Date], MAX ( Dates[Date]), -3 , MONTH ))
RAW SLA% 2 = CALCULATE([RAW SLA%],DATESINPERIOD ( Dates[Date], MAX ( Dates[Date]), -3 , MONTH ))
Count of Call Closed = CALCULATE(COUNT(Query1[Call Closed]),DATESINPERIOD ( Dates[Date], MAX ( Dates[Date]), -3 , MONTH ))

 

 

 

 

5. Create visuals.

visuals2.JPGvisuals1.JPG

 

In addition, please change the slicer field to "MonthName" of "Dates" table.

slicer.JPG

 

 

Best regards

Icey

 

If this post helps,then consider Accepting it as the solution to help other members find it faster.

Icey
Community Support
Community Support

Hi @Anonymous ,

 

It is suggested to modify your data model, such as adding a dates table.

Please refer to this post: Display Last N Months & Selected Month using Single Date Dimension in Power BI.

 

 

Best Regards,

Icey

 

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

Helpful resources

Announcements
ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.