Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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
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
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.
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
Thank you for this quick reply!
Alas, the code shows 2 separate aggreagation types:
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:
Thank you for this quick reply!
Alas, the code shows 2 separate aggreagation types:
- Summing the first 3 cols.
- % 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
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 47 | |
| 35 | |
| 28 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 59 | |
| 58 | |
| 40 | |
| 22 | |
| 20 |