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
Sandeep13
Helper I
Helper I

PREVIOUSQUARTER Function not give correct value in Card

Hello,

 

I want to show last QUARTER  amount in my card but its showing blank.

 

In below image you can see I selected 2 years from year filter and all 4 qtrs.

 

In table matrix my measure PQQ is working fine but in Card it gives blank.
But I am expecting values 31794150 which is in RED circle as my previous qrt value.

 

Please let me know how can to fix this.


Thanks in Advance.

 

Sandeep13_0-1686329020651.png

 

 

@power @alexp @ramicortes @powerbi2 @dbaexperts @Power5 

5 REPLIES 5
v-cgao-msft
Community Support
Community Support

Hi @Sandeep13 ,

 

Please create a new measure:

PQQ 2 = 
IF (
    ISBLANK ( SELECTEDVALUE ( 'Date_table'[Year] ) )
        && ISBLANK ( SELECTEDVALUE ( 'Date_table'[Quarter] ) ),
    CALCULATE (
        [PQQ],
        'Date_table'[Year] = MAX ( 'Date_table'[Year] )
            && 'Date_table'[Quarter] = MAX ( 'Date_table'[Quarter] )
    ),
    [PQQ]
)

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Hi ,

 

Your above dax code is still giving me blank values.

 FYI : In my calender Table I have date till 31 dec 2023.

Sandeep13_1-1686821241847.png

 

Sandeep13_0-1686821169926.png

 

Sandeep13
Helper I
Helper I

@Greg_Deckler  Thanks but your links are very useful but in my case is differenct.
I want to show previous Qtr values in CARD but its showing blank.

 

@Sandeep13 Can you share sample data that can replicate the issue? As text preferrably or a PBIX file link.


@ 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

@Sandeep13 You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000

Also, 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