Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
prabhatnath
Advocate III
Advocate III

Need help on Dax Command to Pull Data from Analysis Service Cube

I have 2 Tables in Analysis Service and I need help for a Dax query to run on Dax Studio to pull Data including executing the measure.

 

Table-1:  'Create Date' is a Calendar Table. Columns: DateId, CalendarDate, FiscalYear, FiscalQtr, CalendarMonth, Calendar Month and Many other columns.

 

Sample Data:

prabhatnath_0-1714442857687.png

 

Table-2: 'OpsView' is the table with Measures.

Columns: DateId, ReportingMonth, Region, RI

Measures: OpsRIRolling, RIRateRolling.

 

The ReportingMonth is Date type.

 

In Power BI we have a Line and Staked Column Chart that has:

X-axis = 'Create Date'[CalendarMonth]  (formated as below)

Y-axis = 'OpsView'[RI]

Line Y-axis = 'OpsView'[RIRateRolling]

 

Sample Data in Table visual:

prabhatnath_0-1714441827493.png

 

And the report has below Filters:

'OpsView'[Region] = ALL .

'Create Date'[Calendar Month] = Date Slicer for last 12 Months.

prabhatnath_1-1714442935434.png

I need help to build a DAX query to execute in DaxStudio to get exact data similar as in the table visual.
Like: MonthName, RI, OpsRIRolling, RIRateRolling, FiscalYear

It should be group By  'Create Date'[CalendarMonth] as in the table visual.

 

Also with that data if we can include region that will be good so in my data I can filter the result per region.

Please help.

Thanks,

Prabhat

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@lbendlin Thanks for your contribution on this thread.

Hi @prabhatnath ,

You can apply the below DAX query in DAX Studio:

EVALUATE
SUMMARIZE (
    FILTER (
        'Create Date',
        'Create Date'[CalendarMonth]
            >= DATE ( YEAR ( TODAY () ) - 1, MONTH ( TODAY () ), 1 )
            && 'Create Date'[CalendarMonth] <= TODAY ()
    ),
    'Create Date'[CalendarMonth],
    "RI", CALCULATE ( SUM ( 'OpsView'[RI] ) ),
    "OpsRIRolling", CALCULATE ( SUM ( 'OpsView'[OpsRIRolling] ) ),
    "RIRateRolling", CALCULATE ( SUM ( 'OpsView'[RIRateRolling] ) ),
    "FiscalYear", 'Create Date'[FiscalYear],
    "Region", 'OpsView'[Region]
)
ORDER BY 'Create Date'[CalendarMonth]

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@lbendlin Thanks for your contribution on this thread.

Hi @prabhatnath ,

You can apply the below DAX query in DAX Studio:

EVALUATE
SUMMARIZE (
    FILTER (
        'Create Date',
        'Create Date'[CalendarMonth]
            >= DATE ( YEAR ( TODAY () ) - 1, MONTH ( TODAY () ), 1 )
            && 'Create Date'[CalendarMonth] <= TODAY ()
    ),
    'Create Date'[CalendarMonth],
    "RI", CALCULATE ( SUM ( 'OpsView'[RI] ) ),
    "OpsRIRolling", CALCULATE ( SUM ( 'OpsView'[OpsRIRolling] ) ),
    "RIRateRolling", CALCULATE ( SUM ( 'OpsView'[RIRateRolling] ) ),
    "FiscalYear", 'Create Date'[FiscalYear],
    "Region", 'OpsView'[Region]
)
ORDER BY 'Create Date'[CalendarMonth]

Best Regards

lbendlin
Super User
Super User

Connect to the cube live.  Add the required data elements to  a table visual. Disable totals. Run Performance Analyzer and grab the DAX query for that visual.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.