Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I'm struggling with evaluating a row context to determine if the specific row I'm in meets certain criteria. I get the error that basically indicates to me that I'm returning a table of values (I'm assuming as part of the VALUES function) rather than a scalar value, even though in my context, the Table Visual only has a single value that meets the criteria.
In simple terms, what I want is:
For given row, if value in column A = X then return a specific value.
I found this thread, but not fully wrapping my head around it: https://community.powerbi.com/t5/Desktop/Trying-to-return-a-single-value-if-one-row-from-another-tab...
Here is my very simple measure:
Measure 2 =
IF(
CONTAINSSTRING(
VALUES(prog_SiteProgram[CSCat]),
"TGH:Acute Care:Ambulatory"
),
[1.acu.a Value],
BLANK()
)
I'm happy with the filtering that is applied on the page, so I don't think I need a CALCULATE function, for the Table that I add the Measure too, I just need it to return in the proper context.
Hope this makes sense...
Thanks,
-Robert
Solved! Go to Solution.
Measure = IF(MAX('Table'[Column]) = X,[1.acu.a Value],BLANK())
Assumes 1.acu.a is a measure.
Measure = IF(MAX('Table'[Column]) = X,[1.acu.a Value],BLANK())
Assumes 1.acu.a is a measure.
Thanks @Greg_Deckler
That works, why? I never would think to use MAX on an evaluation of a String.
User | Count |
---|---|
25 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
27 | |
13 | |
11 | |
9 | |
6 |