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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Mayns
Frequent Visitor

Count distinct by month in a year (video game industry)

Hi all,

I'm working for a video game company and i would like to create a graph to show me the number of distincts games released each month in a selected year. 

 

To make that i created a first measure to define how many games are released in the selected year and i applied this filter to my page 

Mayns_0-1656321737362.png

 here you can see : Fresh Games : 886 during the fiscal year 2021-2022

 

Now i would like to see that per month but if i make a "Distinct count" on the game titles i have this : 

Mayns_1-1656321810701.png

First of all, this is a cumulative bar chart because a game release in april will be sold also in may and after so it is normal but i would like to have the really distinct games by month... so i tried to make April = April ; May = May - April ; June = June - May ; .... but i didn't succeed.

 

Second point ; it is weird because at the end of the fiscal year 'March' , it should be 886 but i have 782 ... :'( 

Someone can help me on this ? Maybe i need to create a mesure to show the distinct games by months...

Thanks in advance 

 

1 REPLY 1
amitchandak
Super User
Super User

@Mayns , You have Cumulative data , you need Cumulative .

 

You can get YTD

 

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"3/31"))

 

or

 

Using FY year and Month (March should be 12)

YTD= CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[FY]=max('Date'[FY]) && 'Date'[FY Month] <= Max('Date'[FY Month]) ))

 

if data is already cumm , you can create a new column

 

new column =

var _max= sumx(filter(Table, [FY] = earlier([FY]) && [FY Month] = earlier([FY Month]) -1) , [Value])

return

[Value] - _max

 

https://medium.com/chandakamit/cheat-sheet-calendar-of-any-standard-month-just-one-variable-apart-5e...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors