Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I have this visualisation (graph) and accomodating table:
The promoted count and status count are based off the following measures:
Promoted Count =
var prom_count =
CALCULATE(
COUNTA([Status]),
FILTER(Table,[Status] = "Promoted")
)
return
if(isblank(prom_count),0,prom_count)
Status Count = counta([Status])
The underlying 'Table' has row by row people by state and by year and whether they were promoted ('Status') or not in that year. In the above example vis you can see that no one from TAS was promoted in 2015,2018-2022, however rather than the measures counting the abscense of promotions as 0 it does not return anything. This leads to a poor visualisation, for the years where there are no records of promoted people the value in the table should be 0, instead because it is missing it joins the records together. Something like the below;
Solved! Go to Solution.
Fixed it by creating a dimension year table and using that YEAR dimension instead of aggregating over the YEAR column in the source data.
There is this "trick" to add 0 to a measure that may return BLANK(). Not a great thing but maybe give it a try.
This does not seem to work. I added 0 to all of the above measures and had no luck.
Promoted Count =
var prom_count =
CALCULATE(
COUNTA([Status]),
FILTER(Hockey_About_Years_Cross,[Status] = "Promoted")
)
return
if(isblank(prom_count),0,prom_count) + 0
Status Count =
var status_count = counta([Status]) + 0
return
if(isblank(status_count),0,status_count) + 0
Fixed it by creating a dimension year table and using that YEAR dimension instead of aggregating over the YEAR column in the source data.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 46 | |
| 43 | |
| 39 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 65 | |
| 31 | |
| 28 | |
| 24 |