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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Fcoatis
Post Patron
Post Patron

Calculate by Age Range

Hi,

 

In a sample data model as follows:

 

Fig 0.PNG

 

My fact table Venda (Sales) has 3 calculated columns :

 

Idade (Age)

 

Fig 1.PNG

 

Etaria (Age Range):

 

Fig 2.PNG

 

and Pos ( just for sort purposes). Im trying to calculate a matrix like this one:

 

Fig 4.PNG

 

But the measure (.Total Range) is not ignoring the Age Range filter. What am I doing wrong? All Ranges for each year , should be the Total for that year.

 

Fig 3.PNG

 

Thanks in advance.

 

Fabio Coatis

 

 

 

1 ACCEPTED SOLUTION

hi, @Fcoatis

After my test, this is due to Sort by Function, so you could use this formula:

.Total Range = CALCULATE([.Total],all(Venda[Etaria],Venda[Pos]))

Result:

3.PNG

 

Best Regards,

Lin

 

 

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

View solution in original post

4 REPLIES 4
v-lili6-msft
Community Support
Community Support

HI, @Fcoatis

I have tested on my side, but not reproduce the issue. If possible, please share detail steps for us.

please share your sample pbix file and expected output. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.

 

 

Best Regards,

Lin

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

Thank you for your reply.

 

Here is the link:

 

https://drive.google.com/drive/folders/1R45lnyJbHMW8SNPtzrVuSRBjfCPiPowX?usp=sharing

 

The result esxpected is :

 

Column12000Column22001Column3

Etaria.Total.Total Range.Total.Total Range
0-2076.831345.44772.938344.210
21-3044.930345.44751.143344.210
31-4069.492345.44752.292344.210
41-5030.166345.44756.998344.210
51-6051.055345.44744.336344.210
61-7072.973345.44766.503344.210
71-80 345.447 344.210
>80 345.447 344.210
Total345.447 344.210 

 

Thanks in advance

hi, @Fcoatis

After my test, this is due to Sort by Function, so you could use this formula:

.Total Range = CALCULATE([.Total],all(Venda[Etaria],Venda[Pos]))

Result:

3.PNG

 

Best Regards,

Lin

 

 

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

Thank you very much Lin.

 

I would never realized that.

 

Kind Regards,

 

Fabio

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors