I want different results in the same row

I have 3 data tables for 3 branches โ€œJaudat Jamunaโ€, โ€œPaddo Priolโ€, โ€œBihot Bazarโ€

And I want to write one formula in a row for showing 3 different tables results in the same row.

Like when I select (Branch = โ€œJaudat Jamunaโ€) below formula will work
Sum(Select(Jaudat Jamuna[Sub],and([Branch]=โ€œJaudat Jamunaโ€,[Date]=[_THISROW].[Date])))

Like when I select (Branch = โ€œPaddo Priolโ€) below formula will work
Sum(Select(Paddo Priol[Sub],and([Branch]=โ€œPaddo Priolโ€,[Date]=[_THISROW].[Date])))

Like when I select (Branch = โ€œBihot Bazarโ€) below formula will work
Sum(Select(Bihot Bazar[Sub],and([Branch]=โ€œBihot Bazarโ€,[Date]=[_THISROW].[Date])))

How to marge those 3 formual
Please help me

Solved Solved
0 4 158
1 ACCEPTED SOLUTION

I will assume that โ€œTHISโ€ table is a 4th table where you select the Branch name and a Date and then are shown a summed result for that Branch. I will call this summed column [Result] since I am not sure what exactly you are summing.

You will want to use an expression like below placed into the App Formula of this [Result] column:

SWITCH([Branch],
    โ€œJaudat Jamunaโ€, Sum(Select(Jaudat Jamuna[Sub],and([Branch]=โ€œJaudat Jamunaโ€,[Date]=[_THISROW].[Date]))),
    โ€œPaddo Priolโ€, Sum(Select(Paddo Priol[Sub],and([Branch]=โ€œPaddo Priolโ€,[Date]=[_THISROW].[Date]))),
    โ€œBihot Bazarโ€, Sum(Select(Bihot Bazar[Sub],and([Branch]=โ€œBihot Bazarโ€,[Date]=[_THISROW].[Date]))),
    0
)

The final zero (0) is a default and only assigned of the selected branch name is not know in this expression.

View solution in original post

4 REPLIES 4

I will assume that โ€œTHISโ€ table is a 4th table where you select the Branch name and a Date and then are shown a summed result for that Branch. I will call this summed column [Result] since I am not sure what exactly you are summing.

You will want to use an expression like below placed into the App Formula of this [Result] column:

SWITCH([Branch],
    โ€œJaudat Jamunaโ€, Sum(Select(Jaudat Jamuna[Sub],and([Branch]=โ€œJaudat Jamunaโ€,[Date]=[_THISROW].[Date]))),
    โ€œPaddo Priolโ€, Sum(Select(Paddo Priol[Sub],and([Branch]=โ€œPaddo Priolโ€,[Date]=[_THISROW].[Date]))),
    โ€œBihot Bazarโ€, Sum(Select(Bihot Bazar[Sub],and([Branch]=โ€œBihot Bazarโ€,[Date]=[_THISROW].[Date]))),
    0
)

The final zero (0) is a default and only assigned of the selected branch name is not know in this expression.

If I want to sum more items like [Sub]+[FS Sub]+[Club]
Then how can I write the formula
Please

I donโ€™t understand the issue.

Assuming that [Sub], [FS Sub] and [Club] are 3 comuns you want to add together, then what you have written IS the expression. [Result] =:

[Sub]+[FS Sub]+[Club]

@WillowMobileSystems

Thanks, Thanks & Thanks

Itโ€™s Working and I learned.

This cooperation of yours prevents wasting my time in future

Top Labels in this Space