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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
RAKESH1986
Helper II
Helper II

How to display selected and previous values

Hi all,

 

could you tell me what is wrong with my mesaure and how to dispaly current and previous values in dashboard.

 

i am trying to write a measure to dispaly -1 of selected values but getting below error.

RAKESH1986_0-1672726208020.png

 

I have these two tables.

table 1. 

 

Discipline, EARLY_PW_W, PW_EARLY_BASELINE

PIPINGPW010.02%
PROJECT MANAGEMENTPW010.31%
PROCESS SAFETYPW010.01%
MECHANICAL STATICPW010.01%
MECHANICAL ROTATINGPW010.01%
MECHANICAL HVACPW010.01%
TELECOMMUNICATIONPW010.01%
ELECTRICALPW010.03%
MATERIAL & CORROSIONPW010.02%
CIVIL & STRUCTURALPW010.02%
PIPELINEPW010.02%
INSTRUMENTATIONPW010.03%
PROCESSPW010.02%
INSTRUMENTATIONPW020.07%
MATERIAL & CORROSIONPW020.03%
MECHANICAL HVACPW020.02%
TELECOMMUNICATIONPW020.03%
PROJECT MANAGEMENTPW021.14%
CIVIL & STRUCTURALPW020.05%
PIPINGPW020.05%
MECHANICAL ROTATINGPW020.03%
PROCESS SAFETYPW020.03%
ELECTRICALPW020.05%
MECHANICAL STATICPW020.02%
PIPELINEPW020.03%
PROCESSPW020.06%

 

and another table linked to this with week no.

 

Progress_Data_Date,ProgressWeekNo,PW_Week_No

9/30/20221PW01
10/7/20222PW02
10/14/20223PW03
10/21/20224PW04
10/28/20225PW05
11/4/20226PW06
11/11/20227PW07
11/18/20228PW08
11/25/20229PW09
12/2/202210PW10

 

so whenver user select any week no it should display both selected and previous week no value..pls help me to get this.

thanks

rakesh

 

6 REPLIES 6
RAKESH1986
Helper II
Helper II

@AbbasG  thanks for the response. i removed the equal = sign still not working and getting below error.

 

RAKESH1986_0-1672742775847.png

 

 

I have no idea why it displays this value automatically, this field is not in my table but it still displays this field. and when I made this correct name, it display above listed error.

 

RAKESH1986_1-1672742971127.png

 

@RAKESH1986 EXPRESSION is missing in the CALCULATE, try re-writing the measure as below.

Measure = CALCULATE(
SUM('15_Early_PW_DISCIPLINE'[PW_EARLY_BASELINE],DataWeek[ProgessWeekNo]-1)


If not, please share sample data or pbix file to work on your problem (after removing all the sensitive information.)

@AbbasG  thanks for the updated query, measure is working now but it's not giving the correct result..

its value is fixed not changing while selecting the week. 

 

RAKESH1986_0-1672751096362.png

 

 

RAKESH1986_1-1672751115031.png

 

 

pbix file is available at this link

https://drive.google.com/drive/folders/1AL4lWng0rdfiEgNTMXHcfYueL6vXzwvO

 

pls help me to resolve this issue.

 

@RAKESH1986 you can use the calculated column, LOOKUPVALUE function to get the Progressweekno from dateweek table as below, and then use the new calculated column as a filter.

AbbasG_0-1672752602260.png

the filter then seems to be working.

 

AbbasG_1-1672752636103.png

 

@AbbasG thanks for the response.  it's working by using the lookup function but I have 10-12 tables and need to apply the same kind of filter. and by lookup way, I have to add in all tables, so want to know is there any other way to do it?

thanks

rakesh

AbbasG
Memorable Member
Memorable Member

@RAKESH1986 not sure, but remove the  = sign

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors