cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
undergreat Frequent Visitor
Frequent Visitor

Creating Table / Matrix with Measures in Rows and different time periods in columns

I am moving from Tableau to powerBI and i am looking to recreate reate the following visual / matrix / table. But I am struggeling. In general, is a structure like this possible in a PowerBI report? Thanks for your help!

 

 Last 7 DaysLast 30 DaysMonth to DateYear to DateLast Year
Impressions     
Clicks     
Conversions     
3 REPLIES 3
Arnault_ Member
Member

Re: Creating Table / Matrix with Measures in Rows and different time periods in columns

@undergreat,

 

You can do that in Power BI. You will have to create a measure for each expected outputs:

 

Last n days =
CALCULATE (
    SUM ( Table[val] ),
    FILTER (
        ALL ( Table ),
        Table[date]
            >= MAX ( Table[date] ) - n
            && Table[date] <= MAX ( Table[date] )
    )
)

 

 

Then, check MTD and YTD function, many examples can be found on the forum.

Same for LY using SAMEPERIODLASTYEAR function.

 

Please aslo check microsoft documentation which provide examples :

https://docs.microsoft.com/en-us/dax/sameperiodlastyear-function-dax

 

Cheers

 

Community Support Team
Community Support Team

Re: Creating Table / Matrix with Measures in Rows and different time periods in columns

@undergreat,

 

This can be achieved by using DAX function like time intelligence function. You can refer to: https://docs.microsoft.com/en-us/dax/time-intelligence-functions-dax.

https://www.sqlbi.com/articles/week-based-time-intelligence-in-dax/

 

Community Support Team _ Jimmy Tao

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

undergreat Frequent Visitor
Frequent Visitor

Re: Creating Table / Matrix with Measures in Rows and different time periods in columns

Thanks for your help. I am familiar with DAX and the time intelligence function. 

 

Unfortunately, your reply does not answer my question. I think the tricky part is to have different custom measures with different timeframes as columns, right?

 

Anyone an idea?

Helpful resources

Announcements
New Topics Started Badges Coming

New Topics Started Badges Coming

We're releasing new versions of the badge that everyone's talking about. ;) Check your inbox for notifications.

MBAS 2020

Save the new date (and location)!

Our business applications community is growing—so we needed a different venue, resulting in a new date and location. See you there!

Difinity Conference

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors (Last 30 Days)