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
Anonymous
Not applicable

Need Alternative for 'Value' function

Hi Team, 

I am facing an issue by using 'Values' as function in one my Query.

My Query: (Measure)

Year-Month = IF(values(Process_level) ="K10 Invoiced",IF(Month(TODAY())>3 ,(Month(TODAY())-3)*[Targets],(Month(TODAY())+9)*[Targets]
),[Targets])

 

Here "Targets" is a measure created. 

 

The problem I face is, as I use 'Values' I couldnt select multiple 'Process_Level' when I add this measure to my visual. I would like to know if any other funcation can be used as an alternative to "Values" or is there a way to handle this ?

 

Kindly help me to fix the same. Thanks in advance

 

1 ACCEPTED SOLUTION
SteveCampbell
Memorable Member
Memorable Member

Just to fully understand, can I confirm a few things -

I am assuming " Process_level " is the name of a colmn? so it would be something like, Table1[Process_level] ?

Are you adding to this to a table of visual, then [Process_level] this being used in a slicer?

 

The problem is that values returns a table, a distinct list of all values. So if you have selected multiple, you are asking if a table equals the string value of "K10 Invoiced". SELECTEDVALUE could do the trick, and I would use a variable:

 

Year-Month =
VAR _Process_level =SELECTEDVALUE ( [Process_level] )

RETURN
IF ( _Process_level = "K10 Invoiced", IF ( MONTH ( TODAY () ) > 3, ( MONTH ( TODAY () ) - 3 ) * [Targets], ( MONTH ( TODAY () ) + 9 ) * [Targets] ), [Targets] ) 

 



Did I answer your question? Mark my post as a solution! Proud to be a Super User!


Connect with me!
Stay up to date on  
Read my blogs on  



View solution in original post

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

 

How about nesting another IF() and VALUES()?  Does that work?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi, 

If 'Value' is used then multiple input cant be given as input. Instead 'FIRSTNONBLANK' can be an option 

 

 

SteveCampbell
Memorable Member
Memorable Member

Just to fully understand, can I confirm a few things -

I am assuming " Process_level " is the name of a colmn? so it would be something like, Table1[Process_level] ?

Are you adding to this to a table of visual, then [Process_level] this being used in a slicer?

 

The problem is that values returns a table, a distinct list of all values. So if you have selected multiple, you are asking if a table equals the string value of "K10 Invoiced". SELECTEDVALUE could do the trick, and I would use a variable:

 

Year-Month =
VAR _Process_level =SELECTEDVALUE ( [Process_level] )

RETURN
IF ( _Process_level = "K10 Invoiced", IF ( MONTH ( TODAY () ) > 3, ( MONTH ( TODAY () ) - 3 ) * [Targets], ( MONTH ( TODAY () ) + 9 ) * [Targets] ), [Targets] ) 

 



Did I answer your question? Mark my post as a solution! Proud to be a Super User!


Connect with me!
Stay up to date on  
Read my blogs on  



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.