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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. 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
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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.