30% off automatic replica cartiers. best swiss iwc replicas is a truly classic and tasty watch. cheap iwcwatch.to sale. approximately four decades might be https://www.audemarspiguetwatches.to/ for sale in usa pioneer. audemarspiguetwatch usa needs superior artistry as well as engineering science. high end https://franckmullerwatches.to/ from replicamaker. each and every high quality https://www.franckmuller.to/ is truly a understand masterpiece of design. absolute hand and wrist in making is actually a leading benefit from luxury movadowatch.to watches. highest quality and absolutely movadowatches.to. have to choose the right store to buy a good luxuryreplicawatch.to,in here you can rest assured.

Conditional Formatting với DAX

Question: Tôi muốn tùy biến Conditional Formatting với DAX, việc này có thực hiện được trên Power BI không?
Answer: Hoàn toàn thực hiện được, việc thiết lập Conditional Formatting với DAX giúp các bạn linh hoạt, chủ động trong việc tùy biến các chỉ số báo cáo.

Kịch bản: Chúng ta có một bảng matrix thể hiện Total Sales theo Năm & Tháng như sau:

Giờ chúng ta muốn những thiết lập một KPI đơn giản sau: giá trị dưới 900,000 VND sẽ có màu nền là màu đỏ, các bạn sẽ viết hàm DAX như sau:

Total Sales with CF = 

var _kpi = 900000

return

IF([Total Sales] > _kpi, "#FF0000")

Lưu ý: ở trên dataMAKER sử dụng mã màu theo Hex code, màu đỏ tương ứng mã #FF0000.

Tiếp theo, chọn Total Sales -> Conditional Formatting -> Background color và áp dụng theo cơ chế Field value (xem lại bài viết sau để nắm cách thao tác)

Sau khi thực hiện thao tác trên, ngay lập tức bạn sẽ thấy kết quả như mong muốn:

Một trick nhỏ mà dataMAKER mách bạn ở đây là thay vì dùng Hex code, chúng ta sẽ nhập luôn màu đỏ để xem Power BI có tự động nhận diện ra không 😀

Total Sales with CF =  

var _kpi = 900000

return

IF([Total Sales] > _kpi, "RED")

Have fun,

Leave a Reply

Your email address will not be published. Required fields are marked *