The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have this measure in DAX:
SWITCH ( TRUE () , MIN ( 'Dynam'[ID] ) = 5 , DIVIDE ( [Gross] , [Revenue] ) * 100, MIN ( 'Dynam'[ID] ) = 8 , [Hours] )
I would like different formats for 1st and 2nd row... I would like the first one to have one decimal, but not the second one.
Can I do a formatting for one row only? (in either DAX or Power BI)
Hi @Anonymous
you can use FORMAT function to return the desired format of each result separately. For example
MyMeasure =
SWITCH (
TRUE (),
MIN ( 'Dynam'[ID] ) = 5, FORMAT ( DIVIDE ( [Gross], [Revenue] ) * 100, "#0.0" ),
MIN ( 'Dynam'[ID] ) = 8, [Hours]
)
User | Count |
---|---|
28 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |