Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I'm still relatively to DAX so pardon me if it's an obvious query.
Basically, I'm working with Google BigQuery's USA names dataset, that lists every birth since 1910 along with the name, gender and state of the child.
I downloaded the Text Filter tool from the Marketplace, so that I could write in a name that would serve as a filter for a heatmap, which would show me the prevalence of that name in each state (as in, what percentage of Texas births were named "John", etc for every state.
I'm confused as to how to pass the name I'm filtering the data with to the measure (as in, I want it to be something like
percentage =
divide(
calculate (
sum(nofbirths);filter(all(usanames);usanames[name]=*slicer text*));
calculate (
sum(nofbirths)))
and I'm guessing it'd only sum the births over each state instead of over the whole table since the measure would apply to each state only.
Do you have any idea on how I can achieve this ?
Update: nevermind, Zineb did the job better than the internet could. ^^
pourcentage = divide(CALCULATE(sum(usa_1910_current[number]);FILTER(all(usa_1910_current);usa_1910_current[name]=SELECTEDVALUE(usa_1910_current[name]) &&usa_1910_current[state]=SELECTEDVALUE(usa_1910_current[state])));CALCULATE(sum(usa_1910_current[number]);FILTER(all(usa_1910_current);usa_1910_current[state]=SELECTEDVALUE(usa_1910_current[state]))))
Solved! Go to Solution.
Hi @Anonymous ,
Try using the following DAX:
percentage = divide(
calculate (
sum(nofbirths);filter(all(usanames);usanames[name]=SELECTEDVALUE(usanames[name]))
);
calculate (
sum(nofbirths)
)
)
If the solution is helpful please give Kudos and if it resolves kindly mark this as a solution! 🙂
Thanks,
Pragati
Hi @Anonymous ,
Try using the following DAX:
percentage = divide(
calculate (
sum(nofbirths);filter(all(usanames);usanames[name]=SELECTEDVALUE(usanames[name]))
);
calculate (
sum(nofbirths)
)
)
If the solution is helpful please give Kudos and if it resolves kindly mark this as a solution! 🙂
Thanks,
Pragati
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.