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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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