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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Ale_los
Regular Visitor

How to add second column with previous month measure created on SSAS

Hello everybody,

 

I’m having the following challenge.

Currently we have SSAS hosting our BI Datamart cube. From there we create all our measures that then we use on Power BI.

I have to create a report that shows several measures for the selected month as well as for the previous month. I have created the measures for previous month using the PARALLELPERIOD function and they are working fine. The challenge is visualizing this data on the same table or matrix in Power BI, I don’t know how to do that.

 

The result should be like this:

 

 

Measures

Current Month Selected

Previous Month

Count Customers

23

20

Count Accounts

34

30

Count Products

4

3

 

The users for this report are restricted to select just one month, not multiples.

I really really appreciate if someone can give me a clue!!

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @Ale_los ,

 

Could you please try to use DATEADD function to work on it such as:

 

prem = calculate([sum]; DATEADD( Dates[Date]; -1 ; Month )

If it doesn't meet your requirement, kindly share your sample data to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hello ,

 

Thank you for your answer and sorry for my late respond. I was off a couple of weeks.

 

The way I solved it was creating a measure using the DAX function SWITCH on the SSAS side. I used SWITCH to calculate a measure for CM, PM and PY. Then on the PowerBI side I used a Matrix, where each column represent CM, PM and PY.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.