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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

SelectedValues function not displaying values for all userid

Hello,

 

I am using the below DAX calculation as a measure in Table visual.

 

PreviousMonth =
Var YT = CALCULATE(SELECTEDVALUE(FACT_ABCD_VW[USER_ID]),FILTER(ALL(DIM_DATE_VW),DIM_DATE_VW[YEAR]=SELECTEDVALUE(DIM_DATE_VW[YEAR]) && DIM_DATE_VW[MONTH]<=SELECTEDVALUE(DIM_DATE_VW[MONTH])))
RETURN YT
 

 

In this formula, there are 6 user ids which are getting skipped, i.e. they do not appear in details report. Instead of this formula, if I user the measure directly from Fact Table, it works normally. Any idea why is this happening.

 

We need a definitive solution for this, any help will be very useful.

 

Thanks in advnace.

 

Swapneel Kale

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Anonymous ,

 

I created some data:

vyangliumsft_0-1704787898601.png

Are you referring to the current year and current month in table DIM_DATE_VW, showing the collection corresponding to table FACT_ABCD_VW[USER_ID]?

 

Here are the steps you can follow:

1. Create measure.

Measure =
CONCATENATEX(
    FILTER(ALL(FACT_ABCD_VW),
    YEAR('FACT_ABCD_VW'[Date])=YEAR(MAX('DIM_DATE_VW'[Date]))&&
    MONTH('FACT_ABCD_VW'[Date])<=MONTH(MAX('DIM_DATE_VW'[Date]))),'FACT_ABCD_VW'[USER_ID],"-")

2. Result:

vyangliumsft_1-1704787898602.png

If it doesn't meet your desired outcome, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi  @Anonymous ,

 

I created some data:

vyangliumsft_0-1704787898601.png

Are you referring to the current year and current month in table DIM_DATE_VW, showing the collection corresponding to table FACT_ABCD_VW[USER_ID]?

 

Here are the steps you can follow:

1. Create measure.

Measure =
CONCATENATEX(
    FILTER(ALL(FACT_ABCD_VW),
    YEAR('FACT_ABCD_VW'[Date])=YEAR(MAX('DIM_DATE_VW'[Date]))&&
    MONTH('FACT_ABCD_VW'[Date])<=MONTH(MAX('DIM_DATE_VW'[Date]))),'FACT_ABCD_VW'[USER_ID],"-")

2. Result:

vyangliumsft_1-1704787898602.png

If it doesn't meet your desired outcome, can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Anonymous
Not applicable

Thanks, will try and get back on same

Ahmedx
Super User
Super User

I think it's better for you to use TOTALYTD

Anonymous
Not applicable

Hi, TOTALYTD is not displaying all the records in details visual, hence I had to do YTD calculation manually.

Ahmedx
Super User
Super User

you tried using MAX instead of SELECTEDVALUE?

MAX(FACT_ABCD_VW[USER_ID])

MAX(DIM_DATE_VW[YEAR])

MAX(DIM_DATE_VW[MONTH])

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.