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
hullterry
Frequent Visitor

Determine value of column header within a visual matrix for use within a measure

I,

Im stuck on a fairly simple issue, how do i get the value of the curent column header value.

ie i have a visual matrix that shows month to date, budget and orders in progress. (whcih are all in a field "versions" in the data table" with that field in the columns section of the visual matrix.

 

I want to show a % act is for the Full month but if the column header is "orders in progress" to return blank.

                  month to date    budget   Orders in progress

Volume        50                       100            10

                   100%                    50%            -

 

( I have simplified the example)

 

so have tried selected value , filters etc but they dont seem to give me the current column value within the measure so i can then go if field value is xx then do yy.

looked simple but just doesnt seem to work

 

many thanks to who can tell the answer....

1 ACCEPTED SOLUTION
hullterry
Frequent Visitor

Ok , turns out to be a simple solution of just using if(Max(field) ="actual" , strange that Max worked on a text field, MaxA didnt and firstnonblank ignored the column perspective. anyway problem solved on how to customise the formula by column. 

View solution in original post

4 REPLIES 4
lbendlin
Super User
Super User

SELECTEDVALUE() has a different meaning depending on which part of the visual you look at.

hullterry
Frequent Visitor

Ok , turns out to be a simple solution of just using if(Max(field) ="actual" , strange that Max worked on a text field, MaxA didnt and firstnonblank ignored the column perspective. anyway problem solved on how to customise the formula by column. 

lbendlin
Super User
Super User

SELECTEDVALUE() will work but only if the cell you are looking at actually has data for that row/column combination. If you cannot guarantee that then you need to fully customize the matrix visual with measures that you compute individually for each column.

Thankyou Ibendin, however it appears that selected value doesnt discern what is the "filter" applied for any one column, it appears to be returning mutiple values (all the values that appear across all tables). whereas i would have thought the selected value when used within a column and selecting the field driving the columns that it would return what the curent column's single value is ie actual or budget, etc. unless im doing something wrong but it does appear to be a fairly straighforward function.  

but thankyou for the thought on this.

Alas it does seem that what should be a straighforward measure in PBI is actually not possiable. 

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.