Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello, looking for some Dax help.
Per the title I am looking for Dax to find the percentage of locations that meet a goal of 4.5 average Google Rating. 0% if it was not reached and 100% if it was. The pivottable needs to be able to calculate the percentage of 0% and 100%'s on the Div Subtotal and GrandTotal lines.
Data model consists of Google rating info similar to this table. Table name: "Google"
Div | Location | Review Source | PostDate | Review Rating |
SMT | 0601-NWN | 5/24/2021 12:00:00 AM | 5 | |
SMT | 0601-NWN | 5/24/2021 12:00:00 AM | 5 | |
SMT | 0601-NWN | Yelp | 5/24/2021 12:00:00 AM | 5 |
SMT | 0601-NWN | Our website | 5/24/2021 12:00:00 AM | 5 |
I have built a measure to find the average Review Rating that I plan to use in my PivotTable Quarter To Date Rating (QTD Rating):
QTD Rating:=ROUND(CALCULATE(AVERAGE(Google[Review Rating]), DATESQTD(Google[PostDate]), Google[Review Source]="Google"),1)
Using Div, Location, and QTD Rating in a pivottable the requested measure is the "Goal Met"
Div | Location | QTD Rating | Goal Met |
BMT | 0201-WBF | 5.0 | 100% |
0202-TBB | 4.6 | 100% | |
0203-ALP | 4.5 | 100% | |
0204-WHN | 4.5 | 100% | |
0205-NVI | 4.4 | 0% | |
0206-GDC | 4.2 | 0% | |
0207-TLR | 4.4 | 0% | |
0208-FHN | 4.3 | 0% | |
0209-GPF | 4.5 | 100% | |
0210-WWC | 4.6 | 100% | |
0211-SBY | 4.3 | 0% | |
0212-MCB | 4.2 | 0% | |
0213-SCS | 4.6 | 100% | |
0214-CTN | 4.4 | 0% | |
0215-FTH | 4.3 | 0% | |
0216-BFT | 4.8 | 100% | |
0217-WRW | 4.2 | 0% | |
0218-DRO | 4.6 | 100% | |
0219-HTS | 4.6 | 100% | |
0220-BFH | 4.2 | 0% | |
0221-TSL | 4.8 | 100% | |
0222-WYE | 4.0 | 0% | |
0223-WRE | 4.4 | 0% | |
0224-CTF | 4.5 | 100% | |
0225-DBN | 4.4 | 0% | |
0226-RHS | 4.6 | 100% | |
0227-SGT | 4.1 | 0% | |
0228-LKO | 4.3 | 0% | |
BMT Total | 4.4 | 46% | |
PMT | 0101-PTS | 4.5 | 100% |
0103-MTV | 4.8 | 100% | |
0104-BWS | 4.3 | 0% | |
0105-SSV | 4.6 | 100% | |
0106-SDB | 4.6 | 100% | |
0107-BHP | 4.8 | 100% | |
0109-PDL | 4.6 | 100% | |
0111-CMT | 4.4 | 0% | |
0112-HBR | 4.4 | 0% | |
0113-BTB | 4.6 | 100% | |
0115-SNV | 4.9 | 100% | |
0116-LGN | 4.7 | 100% | |
0117-NOR | 4.2 | 0% | |
0119-SMY | 4.3 | 0% | |
PMT Total | 4.6 | 64% | |
SMT | 0110-MCD | 4.6 | 100% |
0114-STK | 4.6 | 100% | |
0118-CVT | 4.5 | 100% | |
0120-CYR | 4.6 | 100% | |
0129-DLS | 4.5 | 100% | |
0601-NWN | 4.6 | 100% | |
0602-EPT | 4.8 | 100% | |
0604-FYT | 4.6 | 100% | |
0605-MRT | 4.9 | 100% | |
0606-PTC | 4.8 | 100% | |
0607-LGR | 4.8 | 100% | |
0608-CRL | 4.8 | 100% | |
0609-NWN | 4.7 | 100% | |
SMT Total | 4.7 | 100% | |
Grand Total | 4.5 | 64% |
Thanks for any help!
Solved! Go to Solution.
I still haven't been able to find a suitable dax solution but I was able to build the requested PivotTable by grouping and outputting that dataset as a PivotTable as I illustrated. Thanks for the views and attempts!
I still haven't been able to find a suitable dax solution but I was able to build the requested PivotTable by grouping and outputting that dataset as a PivotTable as I illustrated. Thanks for the views and attempts!
The measure [QTD Rating] will not work correctly. Please get familiar with time-intelligence in Power BI first to create formulas that will always work correctly. You can start with the documentation of the DATESQTD function.
Thanks for the input! For sake of reaching an answer we don't have to filter to any date period at all to get me on the right path. Then I can worry about ensuring accuracy over time.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
46 | |
28 | |
23 | |
12 | |
8 |
User | Count |
---|---|
76 | |
51 | |
45 | |
16 | |
12 |