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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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
Community Champion
Community Champion

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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

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!:
DAX For Humans

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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Community Champion
Community Champion

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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.