The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have an issue and I would like to ask for your assistance. I searched a lot but could not find a solution. My issue is as below.
- I created a dynamic field parameter that allowed me to choose a column (from a list of columns) to be used in a report.
- Then, I wanted to pass that chosen column to a measure. However, it did not work as the column chosen from the dynamic field parameter did not work in the measure.
This is the dynamic field parameter I created:
Now, I wanted to create a measure that would pick the lowest category in the chosen field as the base category (_base_cat); calculate the first-year retention rate of that base category (_min_pct); and then calculate the first-year retention ratedifference for each remaining category based off of the _min_pct. See my calculated measure below.
However, it did not work, as you can see below. To check it, I returned _base_cat, but the "White" category did not show up. Instead, the text name of the chosen column displayed. That means the chosen column did not kick in.
Any suggestions/solutions are much appreciated!
Solved! Go to Solution.
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
expected result: =
VAR _allsales =
CALCULATE ( [sales:], REMOVEFILTERS () )
VAR _percentage =
DIVIDE ( [sales:], _allsales )
VAR _basesales =
MINX (
SUMMARIZE (
FILTER (
sales_support_calculation,
sales_support_calculation[category] = MAX ( prm_category[prm_category] )
),
sales_support_calculation[items]
),
CALCULATE ( SUM ( sales_support_calculation[sales] ) )
)
VAR _basesalespercentage =
DIVIDE ( _basesales, _allsales )
RETURN
_percentage - _basesalespercentage
Hi,
I am not sure if I understood your question correctly, but I tried to create a sample pbix file like below.
Please check the below picture and the attached pbix file.
expected result: =
VAR _allsales =
CALCULATE ( [sales:], REMOVEFILTERS () )
VAR _percentage =
DIVIDE ( [sales:], _allsales )
VAR _basesales =
MINX (
SUMMARIZE (
FILTER (
sales_support_calculation,
sales_support_calculation[category] = MAX ( prm_category[prm_category] )
),
sales_support_calculation[items]
),
CALCULATE ( SUM ( sales_support_calculation[sales] ) )
)
VAR _basesalespercentage =
DIVIDE ( _basesales, _allsales )
RETURN
_percentage - _basesalespercentage
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
36 | |
14 | |
12 | |
7 | |
7 |