Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
Pretty new to Power BI and DAX but I'm having problem calculating a DAX formula getting some information from Microsoft AX 2012. Trying to get the the SUM of all components with certain costgroups to present as a column in this Power BI table, which is the sales a period selected with a slicer.
This SQL does the job when I have found the right "PriceCalcID":
Select SUM(SALESPRICEQTY) from BOMCALCTRANS where PRICECALCID like '058256' and ( COSTGROUPID like 'Mtrl' OR COSTGROUPID like 'SF' )
Trying to this but know I'm missing something. I need first to find the latest date in the selected period.
And for that certain date I need to find the PriceCalcID for the Product No in the above Power BI table.
Solved! Go to Solution.
Hi,
Managed to get a bit further yesterday.
Greated a new table called DM where I filtered posts within a period and categories.
-------------------------------------------------------------------------
Hi @DF8859 ,
Please have a try.
Create a measure.
DM =
VAR _DMLastdate =
MAXX ( ALLSELECTED ( BOMCALATRANS ), BOMCALATRANS[TRANSDATE] )
RETURN
CALCULATE (
SUM ( BOMCALCTRANS[SALESPRICEQTY] ),
FILTER (
ALL ( BOMCALCTRANS ),
( BOMCALCTRANS[COSTGROUPID] = "SF"
|| BOMCALCTRANS[COSTGROUPID] = "Mtrl" )
&& BOMCALATRANS[TRANSDATE] = _DMLastdate
&& BOMCALCTRANS[PRICECALCID] = SELECTEDVALUE ( BOMCALCTRANS[PRICECALCID] )
)
)
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Managed to get a bit further yesterday.
Greated a new table called DM where I filtered posts within a period and categories.
-------------------------------------------------------------------------
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 15 | |
| 8 | |
| 8 | |
| 8 |