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.
When adding a quick measure you can choose your parameters. For instance for the correlation coefficient you can supply your 2 measures. I want that same functionality in my report, because i have 10 measures and for each possible combination i want the correlation to be calculated. So i don't want 10! separate quick measures, but a input box in my report for measure 1 and for measure 2. I looked at a combination of calculation groups and parameter fields. But i can't seem to put 2 different SELECTEDMEASURE() in one calculation item.
So is there a general approach for this? Thanks!
Hi @Riksall,
Thanks for reaching out to the Microsoft fabric community forum.
It looks like you want to dynamically calculate the correlation coefficient between two selectable measures out of a total of 10 available measures but in Power BI, when using Quick Measures, you can supply two measures as input for correlation, but that method creates a fixed measure each time which you does not wants as it creates separate quick measures for every possible pair of the 10 measures.
While you're right that calculation groups don’t support multiple SELECTEDMEASURE() calls in a single item, there's a solid workaround suggested by @wardy912 of using field parameters that gives you the flexibility you're looking for. Kindly go through the response given by @wardy912 and check if your issue can be resolved.
I would also take a moment to thank @wardy912 and @lbendlin, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Hammad.
Community Support Team
@Riksall you may be able to achieve this with parameter fields. I see from your post you already know how to implement these but i'll add details for others that may need this information.
Create a field parameter that includes all 10 of your measures:
Go to Modeling > New Parameter > Fields.
Add your 10 measures.
This creates a slicer-friendly table with a [Name] and [Fields] column.
You’ll need 2 copies of this parameter table (e.g., MeasureSelector1 and MeasureSelector2) to allow two independent selections from 2 separate slicers . SELECTEDVALUE() assumes only one measure is selected per slicer, so you will want to restrict slicers to single selection.
You will then need a DAX measure that compares the 2 slicer selections
Correlation =
VAR Measure1 = SELECTEDVALUE(MeasureSelector1[Fields])
VAR Measure2 = SELECTEDVALUE(MeasureSelector2[Fields])
VAR TableWithValues =
ADDCOLUMNS (
VALUES ( 'YourData'[YourGroupingColumn] ),
"X", CALCULATE ( Measure1 ),
"Y", CALCULATE ( Measure2 )
)
VAR CorrelationResult =
CORREL ( SELECTCOLUMNS ( TableWithValues, "X", [X], "Y", [Y] ), [X], [Y] )
RETURN
CorrelationResult
Replace 'YourData'[YourGroupingColumn] with the dimension over which you want to calculate correlation (e.g., Date, Customer, etc.)
Please let me know if this works by giving a thumbs up and marking as solved, thanks
Thanks Wardy, but CORREL is not a PBI function. I just want to use the code which is generated by the quick measure, and choose my 2 measures as variables in that code..
That is not currently supported. If this is important to you please consider voting for an existing idea or raising a new one at https://ideas.fabric.microsoft.com
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 | |
8 | |
8 | |
7 |
User | Count |
---|---|
13 | |
12 | |
11 | |
11 | |
8 |