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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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...


@ 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!:
The Definitive Guide to Power Query (M)

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()
    )

 

 


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

perfect 

Awesome @Mniknejad , glad it worked!


@ 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!:
The Definitive Guide to Power Query (M)

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...


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors