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.
Hi,
The following measure gives the correct values in power bi but when i am trying to do excel export the total is coming wrong. could any one please modify the below measure.
Measure =
VAR Shortlist =
FILTER(
SUMMARIZE(
'Table',
'Table'[ num ],
"Total", CALCULATE(DISTINCTCOUNT(Sales[Number]),Sales[Status]="Closed")
),
[Total] > 4
)
RETURN
COUNTROWS(Shortlist)
Thanks
Hi @Anonymous ,
Could you tell me if your problem has been solved?
If it is, kindly Accept it as the solution. More people will benefit from it.
Or you are still confused about it, please provide me with more details about your problem.
Best Regards,
Stephen Tao
Hi @Anonymous ,
"Total", CALCULATE(DISTINCTCOUNT(Sales[Number]),Sales[Status]="Closed")
The above formula, what do you want to calculate? DISTINCTCOUNT counts the number of distinct values in a column. If you want to count the number of occurrences of different numbers, you can use the following formula.
"Total",CALCULATE(COUNT(Sales[Number]),FILTER(ALLEXCEPT(Sales,Sales[Number]),[Status]="Closed"))
What kind of visual is your measure placed in, and are there other columns in it? Because if there are other columns, the result will be different.
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , In case you do sum in excel, some time it might not match, as power bi re calculate the grand total again
Hi @amitchandak,
in my above measure there is no scenerio of sum like recalculating the grand total. could you please modify my above measure to give correct totals in both power bi and excel.
Thank you.
@Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Hi @amitchandak,
As it is difficult to provide sample data,
you can consider table in my measure as customer table from adventureworks data ware house and Sales[Number]) and Sales[Status] also from adventureworks data ware house.
Thanks.
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 |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |