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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
anlu20
Frequent Visitor

a way to use a measure for a slicer

Hello everyone,

 

I have created a measure that calculates the calendar weeks. How can I now use the measure as a slicer, since you can't just drag it over?

my measure looks like this:

measure =
var a = CALCULATE(SELECTEDVALUE(calendar[date]))
var b = WEEKNUM(a,2)
return b

 

is there a way to use a measure as a slicer?

 

thank you in advance

1 ACCEPTED SOLUTION
v-rongtiep-msft
Community Support
Community Support

Hi @anlu20 ,

 

A measure can't be used in slicer directly. You can try this.

Create a column.

Column 2 = WEEKNUM(CALCULATE(SELECTEDVALUE('date'[date])),2)

22-4.PNG

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

 

 

Best Regards

Community Support Team _ Polly

 

View solution in original post

2 REPLIES 2
v-rongtiep-msft
Community Support
Community Support

Hi @anlu20 ,

 

A measure can't be used in slicer directly. You can try this.

Create a column.

Column 2 = WEEKNUM(CALCULATE(SELECTEDVALUE('date'[date])),2)

22-4.PNG

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

 

 

Best Regards

Community Support Team _ Polly

 

MFelix
Super User
Super User

Hi @anlu20 ,

 

Check if this video helps you to have the expected result.

 


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.