Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Currently, I have the average revenue made on my dashboard. I would also like to make the median revenue too.
Problem is, I want the median revenue of the sum of each patient.
I want to sum up each patients revenue.... and then take the median of those sums. How do I go about that?
currently these are my codes:
Solved! Go to Solution.
HI @Anonymous,
You can create a variable table with summarize function to group based on current categories and summary these values, then you can use the iterator 'median' function to get the median number from this variable table records.
If you confuse about coding formula, please share some dummy data to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
HI @Anonymous,
You can create a variable table with summarize function to group based on current categories and summary these values, then you can use the iterator 'median' function to get the median number from this variable table records.
If you confuse about coding formula, please share some dummy data to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
@Anonymous,
Try these measures. I created a Patients table with one row per patient, with a relationship to the data table (star schema).
Sum Revenue = SUM ( Revenue[Revenue] )
Median Revenue =
VAR vTable =
ADDCOLUMNS ( VALUES ( Patients[Patient ID] ), "@SumRevenue", [Sum Revenue] )
VAR vResult =
MEDIANX ( vTable, [@SumRevenue] )
RETURN
vResult
Sample data:
Result:
Proud to be a Super User!
HI @Anonymous ,
For this type of calculations you need to use the aggregated syntax that are the ones that end with an X in this case you need to use MEDIANX should look similar to something similar to this:
MEDIANX(Values[Table[PatientID]), [Revenue])
Be aware that this is only a mockup you may need to change the first parameter that is the table part.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsStarting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
93 | |
90 | |
84 | |
70 | |
49 |
User | Count |
---|---|
141 | |
120 | |
112 | |
60 | |
58 |