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

using SELECTEDVALUE function not able to return date value

Hi All,

I am using the below DAX Query,i could not able to return required date.

RS returning one date and pu returing another date,based on user selection i want show the date ,but it showing as blank

Could you please help me on this.

 

Selected_value.PNG

6 REPLIES 6
Anonymous
Not applicable

Hi @mallik999 ,

Sorry to disturb you...

But 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,
Eyelyn Qin

Anonymous
Not applicable

Hi @mallik999 ,

According to my understand, you could add a Slicer for Price_type to realize the step ofselect.

 

In addition, if you want to calculate the minimum date based on each Price_type, the measure could be abbreviated like this:

m_min_Date =
CALCULATE (
    MIN ( 'ANALYTICS VM_GCP05_Report'[VALID_FROM_GMT_DTM] ),
    ALLEXCEPT (
        'ANALYTICS VM_GCP05_Report',
        'ANALYTICS VM_GCP05_Report'[Price_type]
    )
)

My visualizations look like this:

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

Eyelyn Qin

 

Greg_Deckler
Community Champion
Community Champion

@mallik999 This is generally caused by SELECTEDVALUE returning more than one date and if you do not have an Alternate set (last parameter) then you will get this behavior. You can test this by substituting MAXX(...), checking value and then use MINX(...). If you get a different value, there it is.



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
amitchandak
Super User
Super User

@mallik999 , Very difficult to tell like this.

But I do see any Price type filter and you have used selectedvalue on that. So as of now, there is no selectedvalue. Hence blank.

 

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak  Thanks for your reply,

 

its live connection i couldn't able to share the pbix file.

 

I have field like price type it contains RS and PU

when i select RS i want show as 06/07/2020 when i select PU i want show as 03/07/2020

i have taken individual measures and returning the date information is fine, the problem is i wan show in the single card based on selection of price type for that i have written DAX Query you can see in screen print,but its not returning,don't knwo the reason.

 

Regards

Mallikarjun

 

 

@mallik999 , The doubt slicer, I do not see any slicer for Price type; the selected value is failing  Price Type. The way to check, is to return each var one by and check

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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