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
Mniknejad
Frequent Visitor

I want to show YearQty,MonthQty, QuarterQTY,WeekQTY in same reprt

I have a table like this 

date amountweekMonthQuarterYear
2020-01-015491242020
2020-01-015491242020
2020-01-022491242020
2020-01-022491242020
2020-01-024491242020
2020-01-028491242020
2020-01-030491242020
2020-01-036491242020
2020-01-048491242020
2020-01-037491242020
2020-01-0410491242020
2020-01-057491242020
2020-01-060491242020
2020-01-066491242020
2020-01-0622491242020
2020-01-070491242020
2020-01-081501242020
2020-01-090501242020
2020-01-105501242020
2020-01-100501242020
2020-01-104501242020
2020-01-101501242020
2020-01-110501242020
2020-01-1255501242020
2020-01-1310501242020
2020-01-1411501242020
2020-01-151250142020
2020-01-1612251142020
2020-01-17251142020
2020-01-18151142020
2020-01-19151142020
2020-01-20551142020
2020-01-21651142020
2020-01-22451112020
2020-01-2365111

2020

 

I want to create a report like this base on this table 

Date rangeTotal amount
01-Jan10
WEEKQTY 92
MonthQTY179
QuarterQTY328
YearQTY338







1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
Greg_Deckler
Super User
Super User

I did it like the following, PBIX is attached.

 

Measure = 
    VAR __Item = MAX('Table2'[Column1])
    VAR __Date = SELECTEDVALUE('Table'[date ])
RETURN
    SWITCH(__Item,
        "Day",SUMX(FILTER(ALL('Table'),[date ] = __Date),[amount]),
        "Week",SUMX(FILTER(ALL('Table'),[week] = MAX([week])),[amount]),
        "Month",SUMX(FILTER(ALL('Table'),[Month] = MAX([Month])),[amount]),
        "Quarter",SUMX(FILTER(ALL('Table'),[Quarter] = MAX([Quarter])),[amount]),
        "Year",SUMX(FILTER(ALL('Table'),[year] = MAX([year])),[amount]),
        BLANK()
    )

 

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

perfect 

Awesome @Mniknejad , glad it worked!



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Super User
Super User

See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

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.