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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Thalian
Frequent Visitor

Ignore some sliders when calculate measure

I have a huge table with expances on business areas and dates (year and month) and I have a report where I calculate a lot of things using sliders to filter data on certain business area and year and month (example: year 2016, month 6, area Y). Tricky part is that one of the business areas are like support and it should be allocated on other business areas. How I do that? I try to use allexept but it doesn't work like I assume. Does some one have an idea how I can do things what I want?

 

Example: 

BA 1 Month 6 Year 2016 sum 6

BA 2 Month 6 Year 2016 sum 4

BA S Month 6 Year 2016 sum 10

 

On month 6 and year 2016

BA1 = 11

BA2 = 9

(BAS splitted 50-50 on BA1 and BA2)

 

I try to count BAS like calculate(sum(table[sum]);allexepted(table;table[month];table[year])) but it does not give me I right numbers.

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

hi @Thalian

 

to solve this follow this steps:

 

1: Create a measure to distinct count of BA

 

CountBAs =
CALCULATE (
    DISTINCTCOUNT ( Table2[BA] ),
    ALLEXCEPT ( Table2, Table2[Year], Table2[Month] )
)

2, Made the distribution of BAS

 

Newvalue =
CALCULATE ( SUM ( Table2[Value] ) )
    + DIVIDE (
        CALCULATE (
            SUM ( Table2[Value] ),
            FILTER ( ALLEXCEPT ( Table2, Table2[Year], Table2[Month] ), Table2[BA] = "BAS" )
        ),
        [CountBAs] - 1
    )

shiw.png




Lima - Peru

View solution in original post

2 REPLIES 2
Vvelarde
Community Champion
Community Champion

hi @Thalian

 

to solve this follow this steps:

 

1: Create a measure to distinct count of BA

 

CountBAs =
CALCULATE (
    DISTINCTCOUNT ( Table2[BA] ),
    ALLEXCEPT ( Table2, Table2[Year], Table2[Month] )
)

2, Made the distribution of BAS

 

Newvalue =
CALCULATE ( SUM ( Table2[Value] ) )
    + DIVIDE (
        CALCULATE (
            SUM ( Table2[Value] ),
            FILTER ( ALLEXCEPT ( Table2, Table2[Year], Table2[Month] ), Table2[BA] = "BAS" )
        ),
        [CountBAs] - 1
    )

shiw.png




Lima - Peru

Thanks Vvelarde! I use your code to solve my problem. That allexept is a command, what I can't hande properly.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.