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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Need to create a visual that displays data from the current day and the from three historical days

Help,

I am trying to display Contact Center data on a visual, preferably a bar graph of clustered bar graph. The fields contain DateTime and CallsHandled. What I would like to display is the data for Today's Date and times (interval) and then the historical data from the previous 3 days with the same DOW. For example, display Today's datetimes of 10/13/2020 07:00:00 AM... 10/13/2020 06:00:00 PM, 10/6/2020 07:00:00 AM... 10/6/2020 06:00:00 PM, 09/29/2020 07:00:00 AM... 09/29/2020 06:00:00 PM and 09/22/2020 07:00:00 AM... 09/22/2020 06:00:00 PM.

The data is in one table and contains 6 months of historical data.

Any help with this would be greatly appreciated.

Mark

1 ACCEPTED SOLUTION
wdx223_Daniel
Community Champion
Community Champion

wdx223_Daniel_0-1602646734474.png

TTL_Display =
VAR _CurrenctDate =
    TODAY ()
VAR _CurrenctWeekDay =
    WEEKDAY ( _CurrenctDate )
VAR DaysSelected =
    TOPN (
        3,
        FILTER (
            ALL ( ContactData[Date] ),
            WEEKDAY ( ContactData[Date] ) = _CurrenctWeekDay
                && ContactData[Date] <= _CurrenctDate
        ),
        ContactData[Date]
    )
RETURN
    CALCULATE ( [TTL], KEEPFILTERS ( ContactData[Date] IN DaysSelected ) )

hope this can help you!!

View solution in original post

3 REPLIES 3
wdx223_Daniel
Community Champion
Community Champion

wdx223_Daniel_0-1602646734474.png

TTL_Display =
VAR _CurrenctDate =
    TODAY ()
VAR _CurrenctWeekDay =
    WEEKDAY ( _CurrenctDate )
VAR DaysSelected =
    TOPN (
        3,
        FILTER (
            ALL ( ContactData[Date] ),
            WEEKDAY ( ContactData[Date] ) = _CurrenctWeekDay
                && ContactData[Date] <= _CurrenctDate
        ),
        ContactData[Date]
    )
RETURN
    CALCULATE ( [TTL], KEEPFILTERS ( ContactData[Date] IN DaysSelected ) )

hope this can help you!!

Anonymous
Not applicable

Thanks for your response...

I am taking a look at the measure you sent and have a newbe question. What is TTL in the calculate?

I set it up to use my data and ran into this question.

Thanks... Mark

the code of TTL measure is =SUM(ContactData[CallsHandled])

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.