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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
S184019
Advocate III
Advocate III

Calculated field data bars

Is it possible or perhpas already in the works to be able to add data bars to DAX calculated fields?  Once a field is calculated it seems that the data bar option is no longer available. 

 

Thanks, 

 

Mark

4 REPLIES 4
S184019
Advocate III
Advocate III

Hello, 

 

       I have a table with multiple calculated fields.  One is a integer, another a decimal and so on.  Within that table I needed to add a percent of those fields.  Not a problem, got that added and formatted with the necessary conditionality, but once I did, I lost the conditional data bars.  

 

       How does one go about adding those data bars back using DAX?  Below is a snippit of my DAX code.

 

Summarized Table = 
UNION(
(ADDCOLUMNS (
    SUMMARIZE (
        'Measure',
        'Measure'[Dept],
	    "Value", SUM('Measure'[Target1]),
        "Target", BLANK()
    ),
    "Type", "Your FYTD Target", "Sort", 2 )),
(ADDCOLUMNS (
    SUMMARIZE (
        'NTC Summary',
        'NTC Summary'[Dept],
    "Value", SUM('NTC Summary'[Value]),
    "Target", SUM('NTC Summary'[Target])
    ),
    "Type", "Your Value", "Sort", 3 )),

(ADDCOLUMNS (
    SUMMARIZE (
        'Measure',
        'Measure'[Dept],
    "Value", SUM('Measure'[Target2]),
    "Target", BLANK()
    ),
    "Type", "Your Target", "Sort", 1 )),
(ADDCOLUMNS (
    SUMMARIZE (
        'Measure',
        'Measure'[Dept],
    "Value", FORMAT('Measure'[% Growth]/100, "Percent"),
    "Target", BLANK()
    ),
    "Type", "Avg % Growth (FYTD v. PFYTD)", "Sort", 4 )))

Thanks in advance!

 

Humbly yours, 

 

Mark

v-qiuyu-msft
Community Support
Community Support

Hi @S184019,

 

Based on my test in Power BI desktop August version, as long as the calculated column putted in the table visual has been set with one aggregation (eg: SUM), the Data Bars is available in conditional Formatting options. 

 

q1.PNG

In your scenario, please ensure the calculated field you mentioned has be set with one aggregation. Please run desktop August version if possible. 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-qiuyu-msft

 

Thank you for this quick reply!

 

Alas, the code shows 2 separate aggreagation types:

  1. Summing the first 3 cols.
  2. % Growth / 100 in last col.

Perhaps this is something which may be added to DAX or PBI in the future?  Dax Code could be:

 

FORMATBAR('Table'[Column],MIN,MAX)

 

Is there another work around? 

 

Thanks again for the help!

 

 


@S184019 wrote:

@v-qiuyu-msft

 

Thank you for this quick reply!

 

Alas, the code shows 2 separate aggreagation types:

  1. Summing the first 3 cols.
  2. % Growth / 100 in last col.

Perhaps this is something which may be added to DAX or PBI in the future?  Dax Code could be:

 

FORMATBAR('Table'[Column],MIN,MAX)

 

Is there another work around? 

 

Thanks again for the help!

 

 


Hi @S184019,

 

Not sure what you mean about above highlighted section? Would you please share some screenshots to clarify it? 

 

Best Regards,
Qiuyun Yu 

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.