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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
JAllory
Regular Visitor

SELECTEDVALUE from Slicer and include in calculated column

Hello

I am new on powerBI desktop

I have a Tab DIM called Dim-WEEK with date and noweek

I have a slicer on noweek

I have a measure called selection :   Selection = SELECTEDVALUE('Dim-WEEK'[noWeek])

I have a TAb CLUSTERS with each line with one cluster and total number of cores

I want to add in my Tab CLUSTERS a calculated column taking the minimum value of Total number of cores versus sum of vcpu SQL

 

I have a Tab FACT with several calculated columns

               vcpu SQL = IF ([appli]= "SQL" ; MAX('MyFACT'[vcpu];4);0)

               vcpu SQLd = IF ([Week] = "31";'MyFACT'[vcpu SQL];0)

 

I want to replace "31" by the selected week so [selection] or directly SELECTEDVALUE('Dim-WEEK'[noWeek]

but it doesn't work L my other calculs are wrong

If I keep “31” equivalent of week 31 selected …my calculs are OK

Thanks to help to find What I have to do

 

1 ACCEPTED SOLUTION

Thanks a lot

Joelle

View solution in original post

3 REPLIES 3
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @JAllory,

 

Why not try with creating a measure to achieve that?

 

As I know, Power BI does not support dynamic calculate column based on slicer, we should use measure.

 

You could have a reference of this similar thread.

 

If you still need help, please share some data sample and your desired output.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks a lot

Joelle

Thanks a lot

Joelle

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.