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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

How to get one measure based on a data slicer in my matrix which does'nt affect the other measures.

Hello,

 

I've been building a report for my company. It's a revenue statement by week.

It contains three colums: Budget revenue, last years revenue and this years revenue.

The visualization i use is a matrix. The weeks are selected as "Rows" and the three colums above as value.

 

I have a slicer with a weeknumber which has not a relationship with the matrix because i want to see all the weeks of the year. This is because i can check the upcoming weeks for my budget and last years revenue. But i want to create a measure for my current revenue that is affected by the weeknumber slicer because when I select week 20, i will only see the current revenue till week 20, although there are record for week 21 and further.

 

Is there any possibility to make a measure like above?

 

Thanks in advance.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , As week is coming from the independent table

 

//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Week])
return
calculate( sum(Table[Revenue]), filter('Date', 'Date'[Week] <=_max))

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , As week is coming from the independent table

 

//Date1 is independent Date table, Date is joined with Table
new measure =
var _max = maxx(allselected(Date1),Date1[Week])
return
calculate( sum(Table[Revenue]), filter('Date', 'Date'[Week] <=_max))

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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