Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have two measures currently doing a count on a text field shown below
Solved! Go to Solution.
Hi @Anonymous ,
Based on your description, I have created a simple sample like this:
Please try:
Difference =
var AverageApples = COUNTROWS(FILTER('Table',[Category]="Apple"))/(DATEDIFF(MIN([Date]),MAX([Date]),DAY)+1)
var AveragePears = COUNTROWS(FILTER('Table',[Category]="Pear"))/(DATEDIFF(MIN([Date]),MAX([Date]),DAY)+1)
Return AverageApples – AveragePears
Output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Based on your description, I have created a simple sample like this:
Please try:
Difference =
var AverageApples = COUNTROWS(FILTER('Table',[Category]="Apple"))/(DATEDIFF(MIN([Date]),MAX([Date]),DAY)+1)
var AveragePears = COUNTROWS(FILTER('Table',[Category]="Pear"))/(DATEDIFF(MIN([Date]),MAX([Date]),DAY)+1)
Return AverageApples – AveragePears
Output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
This worked perfectly, thank you!
@Anonymous , this is count, Avg based on what , Say Date, Month , Region, City etc.
Based on the need
Averagex(Values(Table[Month Year]), [Total Apples]) - Averagex(Values(Table[Month Year]), [Total Pears ])
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |