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 have division measure, which contains values some of them should be displayed as %, and the rest as numbers, formatting should be based on another values in another feild.
for example if attribute=ABC then measure should be in percentage else should be shown in number.
my organisation doesnt allow tabular editor, so please suggest a solution that doesnt contain tabular editor.
Solved! Go to Solution.
Hi @Zaytoon
You can do
Mesure2 =
VAR Value1 = [Measure1]
RETURN
IF ( SELECTEDVALUE ( 'Table'[Attribute] = "ABC", FORMAT ( Value1, "Percent" ), Value1 )
Many thanks tamer that worked perfectly well in matrix table however sth gone wrong in charts as shown below, the attribute whose condition is true disappeared from chart. do you know how this can be sorted.
FORMAT returns a string ( text data type) l. The chart cannot determine a value of a text and hence cannot plot a text.
Hi @Zaytoon
You can do
Mesure2 =
VAR Value1 = [Measure1]
RETURN
IF ( SELECTEDVALUE ( 'Table'[Attribute] = "ABC", FORMAT ( Value1, "Percent" ), Value1 )
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
12 | |
10 | |
6 |