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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Magnus_Hedlund
Frequent Visitor

Simple noob calulation help

Hi,

 

I'm a noob on using Power BI and have tried to find a solution for this on my own but without success.

I have one table at the moment with alot of columns where three columns are of importance.

- ID (string)

- Created date (date/time)

- Resolved date (date/time)

 

I would like to divide the amount of [ID] per [Resolved date] with the amount of [ID] per [Created date] and visualize this result per calender month. How would I go about to achieve this?

 

Thanks in advance for any help

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@Magnus_Hedlund You will need a disconnected Date table or a Date table with an active and inactive relationship. If you use a disconnected table you would use the Dates[Date] column in the x-axis of something like a clustered column visual and your 2 measures would be something like this:

Created Measure = 
  VAR __Dates = DISTINCT('Dates'[Date])
  VAR __Table = FILTER('Table', [Created date] IN __Dates)
  VAR __Result = COUNTROWS(__Table)
RETURN
  __Result

Resolved Measure = 
  VAR __Dates = DISTINCT('Dates'[Date])
  VAR __Table = FILTER('Table', [Resolved date] IN __Dates)
  VAR __Result = COUNTROWS(__Table)
RETURN
  __Result

 

Now, if you have a true timestamp of something other than 12:00:00 AM then you might have to do this:

Created Measure = 
  VAR __Dates = DISTINCT('Dates'[Date])
  VAR __Table = FILTER('Table', TRUNC([Created date]) IN __Dates)
  VAR __Result = COUNTROWS(__Table)
RETURN
  __Result

Resolved Measure = 
  VAR __Dates = DISTINCT('Dates'[Date])
  VAR __Table = FILTER('Table', TRUNC([Resolved date]) IN __Dates)
  VAR __Result = COUNTROWS(__Table)
RETURN
  __Result

 

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

HI @Greg_Deckler 

Thx for the reply.

This seems complicated...

As the tool can visualize the number of [ID] per [Created date].[Month] and [Resolved date].[Month] respectively I hope there is an easier way because it is basically a divide of those 2 visualization that I am seeking. 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.

Top Solution Authors