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
SDPowerBI123
Regular Visitor

Selectedvalue dax question

i have a simple what if parameter generating a list of numbers like this:

Numbers of Months = GENERATESERIES(3, 26, 1),
 
and then i have a selectedvalue dax measure that captures what is being selected like this:
Numbers of Months Value = SELECTEDVALUE('Numbers of Months'[Numbers of Months])
 
i put this measure in a card, and link the column to a slicer, when i selected lets say 15, the card with the measure inside says 15 no problem.
 
the problem is when i try to use this selectedvalue dax in another measure like this one:
Open X Months Prior =
var PriorDate = DATEADD('O 29 Years Monthly'[Date], -'Numbers of Months'[Numbers of Months Value], MONTH)
RETURN
CALCULATE(
    SUM('O 29 Years Monthly'[Open]),
    ALL('O 29 Years Monthly'),
    'O 29 Years Monthly'[Date] = PriorDate
)
 
so long story short i am trying to do some data analysis on some stock, and i try to discount the months back, i assume that measure would work in that second measure, but it just returns blank. can any one help me to understand why its returning blank when the card clearly says its returning a number? thanks.
 
i put link below.
 
3 REPLIES 3
Wilson_
Super User
Super User

Hi SDPowerBI123,

 

Can you please share a sample pbix file? (If you don't know how, please check the pinned thread in the forum.) It would make debugging your issue easier. 🙂

 

There's at least some context missing on how and where you're using these measures, and probably what your model looks like (ie: tables and relationships).




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





hey i posted link, please have a look.

SDPowerBI123,

 

The link tells me the file does not exist.




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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
Top Kudoed Authors