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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi guys,
I am a green hand, just met a problem that I would like to get a help . I don't calculate the %GT sum of reg during whole period like below, I want to calculate by day, for exampler how much of percentage of affiliates share in 1/7 (100%), how should I write the dax ?
Solved! Go to Solution.
Hi @clarafff ,
Create measure.
Percentage of affiliates per day:
Measure_affiliates =
var _count=COUNTX(FILTER(ALL('Table'),'Table'[REFERENCE_DATE]=MAX('Table'[REFERENCE_DATE])),[ACQUISITION_CHANNEL])
var _countaffiliates=COUNTX(FILTER(ALL('Table'),'Table'[REFERENCE_DATE]=MAX('Table'[REFERENCE_DATE])&&'Table'[ACQUISITION_CHANNEL]="affiliates"),[ACQUISITION_CHANNEL])
return
DIVIDE(
_countaffiliates,_count)
Measure_group =
var _count=COUNTX(FILTER(ALL('Table'),'Table'[REFERENCE_DATE]=MAX('Table'[REFERENCE_DATE])),[ACQUISITION_CHANNEL])
var _countgroup=COUNTX(FILTER(ALL('Table'),'Table'[REFERENCE_DATE]=MAX('Table'[REFERENCE_DATE])&&'Table'[ACQUISITION_CHANNEL]=MAX('Table'[ACQUISITION_CHANNEL])),[ACQUISITION_CHANNEL])
return
DIVIDE(
_countgroup,_count)
Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @clarafff ,
Create measure.
Percentage of affiliates per day:
Measure_affiliates =
var _count=COUNTX(FILTER(ALL('Table'),'Table'[REFERENCE_DATE]=MAX('Table'[REFERENCE_DATE])),[ACQUISITION_CHANNEL])
var _countaffiliates=COUNTX(FILTER(ALL('Table'),'Table'[REFERENCE_DATE]=MAX('Table'[REFERENCE_DATE])&&'Table'[ACQUISITION_CHANNEL]="affiliates"),[ACQUISITION_CHANNEL])
return
DIVIDE(
_countaffiliates,_count)
Measure_group =
var _count=COUNTX(FILTER(ALL('Table'),'Table'[REFERENCE_DATE]=MAX('Table'[REFERENCE_DATE])),[ACQUISITION_CHANNEL])
var _countgroup=COUNTX(FILTER(ALL('Table'),'Table'[REFERENCE_DATE]=MAX('Table'[REFERENCE_DATE])&&'Table'[ACQUISITION_CHANNEL]=MAX('Table'[ACQUISITION_CHANNEL])),[ACQUISITION_CHANNEL])
return
DIVIDE(
_countgroup,_count)
Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
thanks! I got inspired by your dax.
@clarafff , % of Grand
Divide([Measure], calculate([Measure], allselected()) )
Or Sub Total
Divide([Measure], calculate([Measure], Filter(allselected(Table), Table[Day] = max(Table[Day]) ) )
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
User | Count |
---|---|
14 | |
10 | |
7 | |
6 | |
5 |
User | Count |
---|---|
30 | |
19 | |
12 | |
7 | |
5 |