Forum Discussion
Help Needed in Writing a Calculation
My requirement is keeping ID as Fixed find the value when the Temp is between 0 and 32. I have written a calculation in tableau and would like to wirte the same calculation in DAX. Kindly help me
{ FIXED [CustomerID] : MIN(
IF [Temp] >= 0 AND [Temp] <= 32 THEN [Value]
END
)}
Sample data is attached
| Customer ID | Temp | Value |
| T02 | 35 | 62 |
| T03 | 33 | 56 |
| T06 | 31 | 54 |
| T01 | 35 | 59 |
| T04 | 26 | 63 |
| T05 | 27 | 57 |
| T01 | 35 | 52 |
| T02 | 27 | 65 |
| T03 | 35 | 63 |
| T01 | 30 | 64 |
| T05 | 27 | 55 |
| T01 | 26 | 65 |
| T02 | 28 | 56 |
| T06 | 30 | 52 |
| T04 | 31 | 58 |
| T05 | 33 | 51 |
| T02 | 30 | 60 |
| T01 | 29 | 59 |
| T03 | 33 | 57 |
| T02 | 27 | 53 |
Hi,
Please check the below picture and the attached pbix file.
It is for creating a new table.
New Table = FILTER ( Data, Data[Temp] >= 0 && Data[Temp] <= 32 )jananagarajan You can achieve this through visual or page-level filters.
In the below image, I have applied a visual level filter on the Temp field. Hope this helps.For fun only, a showcase of powerful Excel worksheet formula,
T-SQL solution,
5 Replies
- Jihwan_KimSuper User
Hi,
Please check the below picture and the attached pbix file.
It is for creating a new table.
New Table = FILTER ( Data, Data[Temp] >= 0 && Data[Temp] <= 32 ) - CNENFRNLCommunity Champion
For fun only, a showcase of powerful Excel worksheet formula,
T-SQL solution,
- AbbasGMemorable Member
jananagarajan You can achieve this through visual or page-level filters.
In the below image, I have applied a visual level filter on the Temp field. Hope this helps.- jananagarajanRegular Visitor
Thank you
- jananagarajanRegular Visitor
Thank you