Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi all,
So my dateset looks like this.
Date_key | Year_week | Search_Phrase | Searches | Customer Type | Channel | CTR | Product Group |
20230101 | 202310 | powerbi | 28 | Retail | Web | 10% | software |
20230101 | 202310 | powerbi | 10 | Business | Web | 2% | software |
I want to create a dashboard with
Search Phrase | Searches | CTR |
powerbi | 38 | 7,8% (= weighted average) |
On the left I have slicers with
1. Date_key
2. Year_week
3. Channel
4. Product Group
5. Customer Type
First question
- I need the searches amounts to be adjusted to the selections in the slicers
- AND identical searches phrases need to be summed so in this case 10 + 28
Second question
- I need the CTR to be weighted average of the CTRs
What variables do I need to add in my model to get this desired result?
Thanks for your help!
Solved! Go to Solution.
Hi @TheJ010,
You do not need mention SUM() function twice in your measure.
Define the total of the searches as Sum of Phrase Searches = SUM(Table, Phrase Searches) and then use this measure as the denominator in the SUMX() function.
Proud to be a Super User!
So
if I understand this correctly, you basically want a groupby behavior in tour dashboard and slicers to affect your report.
That should be the defut behavior when u drag and and drop your search term to a table and views in the values bucket.
when it comes to the getting weighted average, you must define wht are the weights based of?
Basically for every row occuring aginst the search term ' a' you're multiplying searches and ctr, then after the multiplying is done ur dividing it by the total sum of searches.
If you find my answer helpful, an up vote would be appreciated 😊
This unfortunately did not work.
SUMX(TABLE, TABLE[SEARCHES]*TABLE[Clickrate])/SUM(SUM(AF_SEARCH_DB[SEARCHES]))
Hi @TheJ010,
Make 2 measures:
1. Sum of Phrase Searches = SUM(Table, Phrase Searches)
2. Weighted Average = SUMX(Table, (Phrase Search* CTR)/[Sum of Phrase Searches]) i.e Use the first measure in the 2nd one.
Apologies, if my syntax is wrong, but you get the gist.
Create the drop everything on the table visual and slicers as you need and PBI will take care of the rest.
Proud to be a Super User!
Too many arguments were passed to the SUM function. The maximum argument count for the function is 1.
I get this error argument.
Hi @TheJ010,
You do not need mention SUM() function twice in your measure.
Define the total of the searches as Sum of Phrase Searches = SUM(Table, Phrase Searches) and then use this measure as the denominator in the SUMX() function.
Proud to be a Super User!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
97 | |
69 | |
46 | |
39 | |
33 |
User | Count |
---|---|
163 | |
110 | |
61 | |
51 | |
40 |