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.
Hi - I have a query that has one value in it. I want to take that value, and divide it by the number of rows in another query. Then, subtract that value from all the rows in that second query. I created a measure that taskes the single value and divides it by the row count, and that worked. But I can't figure out how to reference the unique value produced by that measure and reduce every row by that value.
E.g. I have a query (Query1) that I filtered down to just be 1 row, 1 column. The value of that cell is $639,792. On the visual screen, I did a quick measure that divided the $639,792 by the total number of rows (which for me is a count of how many weeks) in another query (Query2). The value came out to $4300. I now want to take that $4300 and subtract it from every row in Query2 in a custom column. For the sake of time, I have done a manual "subtract" of the $4300 to work for my presentation today, but I'd like it to be automated.
Solved! Go to Solution.
Hi @Anonymous ,
According to your description, here are my steps you can follow as a solution.
(1) My test data is the same as yours.
(2) We can create a calculated column on Table Monthly RMP Forecast.
Column =
[RMP]
- DIVIDE (
MIN ( 'Anticipated PTO'[Anticipated PTO $ Value Total] ),
COUNTROWS ( ALL ( 'Monthly RMP Forecast' ) ),
0
)
(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
According to your description, here are my steps you can follow as a solution.
(1) My test data is the same as yours.
(2) We can create a calculated column on Table Monthly RMP Forecast.
Column =
[RMP]
- DIVIDE (
MIN ( 'Anticipated PTO'[Anticipated PTO $ Value Total] ),
COUNTROWS ( ALL ( 'Monthly RMP Forecast' ) ),
0
)
(3) Then the result is as follows.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
That worked! Thank you. If we wanted to count rows based on the week ending column and only count rows that are after TODAY(), how would we do that?
I want to take column "RMP" in Query "Monthly RMP Forecast" and minus "Anticipated PTO" (from another query)/Table.RowCount (from "Monthly RMP Forecast")
It would be even better if I could just subtract is from the rows whose date is in the future.
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 |
---|---|
79 | |
73 | |
58 | |
36 | |
32 |
User | Count |
---|---|
90 | |
62 | |
61 | |
49 | |
45 |