Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
I am trying to find the weightfactor by dividing the row count of one table by the row count of another table. For this I have two tables. The first table is called BAG. Within this table I have three columns named pandid, builbjr_min (groepen) and dom_functie. The original table is very large, but I added a measure called wf_som_gebr_jaar to count the amount of rows for the table. See the DAX measure below the table.
If anything is unclear, please let me know and I will try to elaborate.
Thank you in advance!
Solved! Go to Solution.
I have solved the problem by replacing the measure of wf_som_gebr_jaar_panden by the measure:
Hi @OffermansWE -create a measure that calculates the weight factor by dividing the row count of the BAG_panden table by the row count of the EP_online table
wf_som_gebr_jaar_panden =
CALCULATE(
DISTINCTCOUNTNOBLANK(BAG_panden[pandid]),
ALLEXCEPT(
BAG_panden,
BAG_panden[bjr_min (groepen)],
BAG_panden[dom_functie]
)
)
Create another measure for EP
wf_som_gebr_jaar_ep_online =
CALCULATE(
COUNTROWS(EP_online),
ALLEXCEPT(
EP_online,
EP_online[ConstructionYear (groepen)],
EP_online[BuildingApplication],
EP_online[Code]
)
)
Then create measure to calculate percentage from both above measures.
%weightfactor = [wf_som_gebr_jaar_panden]/[wf_som_gebr_jaar_ep_online]
use divide function.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Proud to be a Super User! | |
Hi @rajendraongole1. Unfortunatly this gives the same result as I already had. I have created an example pbix (https://www.dropbox.com/scl/fi/98zjfbgqmls2cqi7z9rdj/Example_file.pbix?rlkey=83idmeh4l7l4gdwofjbv5nt...) of the results and I have added the expected results. Also you can see how the tables are related within this pbix. I actually want to divide the first table by the second table to get the right results in the third table.
I have solved the problem by replacing the measure of wf_som_gebr_jaar_panden by the measure:
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
7 | |
6 | |
5 |
User | Count |
---|---|
20 | |
11 | |
10 | |
9 | |
6 |