cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vijayvizzu
Helper II
Helper II

Last Week comparison not working properly

Hi

I have created a measure to compare the current week value with last week value. Its working fine in some pages, but all.

 

X_Test_Measure = 

VAR _LW_Price = 
LASTNONBLANKVALUE(
        DATEADD(
            CalendarT[Date],
            -7,DAY
        ),
        [Total Value]
    )
VAR _CW_Price =
    LASTNONBLANKVALUE(
        CalendarT[Date],
        [Total Value]
    )
RETURN 
IF( ISBLANK( [Total Value]),BLANK(),_CW_Price-_LW_Price)

 Below matrix value shows me correct values, but when i am putting into a matrix visual as top level info it gives me blank.Unable to find out the error

vijayvizzu_0-1626945397139.png

vijayvizzu_1-1626945439805.png

 

3 REPLIES 3
v-janeyg-msft
Community Support
Community Support

Hi, @vijayvizzu 

 

There is a suitable context in the matrix so it is displayed correctly. Since your measure contains other measure, we can't judge why there is a blank based on the information you provide. If you can't provide data, I think you need to check whether the context and the measure are in harmony.

vjaneygmsft_0-1627282651127.png

Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.


Best Regards,

Community Support Team _ Janey

 

amitchandak
Super User IV
Super User IV

@vijayvizzu , Make sure Cw_no is coming from the date table .

 

or

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

refer if needed

 

Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...
https://www.youtube.com/watch?v=pnAesWxYgJ8



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Thank you, but i can't able to upload any document as my PC doesnt allow me to upload anything

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Top Solution Authors
Top Kudoed Authors