Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
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
So I've been playing around with the USA Names dataset from BigQuery, and I've been trying to make a viz that shows the prevalence of a given name in each state (as in, the percentage of people having that name in that state over the total population of the state).
I'm still relatively new to Power BI so I still get a little confused when it comes to DAX, especially when it comes to measures like this where I get really confused when it comes to dealing with both a sum affected by a slicer and one relative to the whole table.
I wanna have a map like this, but instead of the total number of people, I'd get the percentage instead.
I tried creating a GroupBy table with the names and the states, and make the percentage a column instead, as follows, but it kept giving me weird values.
Solved! Go to Solution.
Hi @Anonymous
try Measure like this.
Measure =
DIVIDE(
COUNTROWS( 'Table' ),
CALCULATE(
COUNTROWS( 'Table' ),
ALLEXCEPT( 'Table', 'Table'[Name] )
)
)
Hi @Anonymous
try Measure like this.
Measure =
DIVIDE(
COUNTROWS( 'Table' ),
CALCULATE(
COUNTROWS( 'Table' ),
ALLEXCEPT( 'Table', 'Table'[Name] )
)
)
Hi @Anonymous
My dataset.
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.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 68 | |
| 67 | |
| 33 | |
| 31 | |
| 29 |