Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi!
I'm trying to create a calculated column with a value (Invoice Discount) divided by the number of rowsç
this is my dax function:
Importe1 = calculate(max(InvoiceSet[Invoice Discount]);ALLSELECTED(InvoiceSet)) / CALCULATE(COUNTROWS(InvoiceSet);ALLSELECTED(InvoiceSet))
This is my matrix and the solution would be 20/ 15
Invoice discount = 20 and the number of rows is 15
with a measure it works but I want it to be a column and the result is not as I hope (1.33, Importe 1 is 1.12)
¿Any idea?
Thanks so much!!!!! ![]()
If I do Importe as a measure as you say, when I put a KPI with this value it doesn't summarize correctly unless it is a column that's why I want it to be a column, is not any way of doing it being a column??
thanks so much!!
Hi sdjensen:
if I put it as a measure it works, but I want it to be a column to be able to discount Importe1 so importe would be:
Importe = Importe - Importe 1
Thanks so much for helping me!! 😉
Why do you want it as a calculated column?? You should be able to obtain the same just with an extra measure defined as Importe - Importe 1.
If you want this new measure to be called Importe then you need to find a new name for the current called Importe.
I'm unable to modify anything in "Edit Queries" in your pbix file. Looks like it uses an external data source. Is it possible for you to import the data into the PBIX file so it doesn't rely on connecting to an external data source?
Since you want a calculated column, that means Power Query (M) must be used.
I have imported the data from external source (Dynamics CRM), you should be able to modify it....
sorry if you can't
Hey Buddy
You have problem with your data modelling or Table Relationship. Please check on this. whenever u getting the same value mean u have prob with your Relationship.
Sorry, this is the correct link
I just cheched out your model. You should calculate Importe1 as a measure not as a calculated column in your table.
I have uploaded to onedrive
https://onedrive.live.com/?id=root&cid=CF098846A6E4E947
It's the document Ejemplo number of rows
I hope it works
Thanks so much!!!!
Can you provide the .pbix file?
Hi Adolfo,
Thank you very much for answering me , but I'm not able to sendo an email, and in your linkedin you haven't your mail published, so I can't contact with you,
thank you any way
It would indeed be very helpful if you could share your pbix file.
For instance via OneDrive, share the file, and paste the link here.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 32 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |